Skip to contentSkip to conversation

minidlna: Fix configure ffmpeg detection when OpenSSL support is enabled

PATCH New Bernd Kuhls 3 participants 3 messages Jan 18, 2014 – Feb 7, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 minidlna: Fix configure ffmpeg detection when OpenSSL support is enabled

Fixes http://autobuild.buildroot.net/results/c66/c663a518f65e786895d9ad8866193f70cbd6e96d//

---
 package/minidlna/minidlna.mk |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/minidlna/minidlna.mk +6 -1
index 94c2641..174f650 100644
@@ -13,13 +13,18 @@ MINIDLNA_DEPENDENCIES = \
 	ffmpeg flac libvorbis libogg libid3tag libexif libjpeg sqlite \
 	host-xutil_makedepend
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+MINIDLNA_FFMPEG_SSL_LIBS=-lcrypto -lssl
+endif
+
 ifeq ($(BR2_PREFER_STATIC_LIB),y)
 # the configure script / Makefile forgets to link with some of the dependent
 # libraries breaking static linking, so help it along
 MINIDLNA_CONF_ENV = \
-	LIBS='-lavformat -lavcodec -lavutil -logg -lz -lpthread -lm'
+	LIBS='-lavformat -lavcodec -lavutil -logg -lz -lpthread -lm $(MINIDLNA_FFMPEG_SSL_LIBS)'
 else
 MINIDLNA_CONF_OPT = \
+	LIBS='$(MINIDLNA_FFMPEG_SSL_LIBS)' \
 	--disable-static
 endif
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 minidlna: Fix configure ffmpeg detection when OpenSSL support is enabled

Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> writes:

Fixes http://autobuild.buildroot.net/results/c66/c663a518f65e786895d9ad8866193f70cbd6e96d//

---
 package/minidlna/minidlna.mk |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/minidlna/minidlna.mk +0 -0
index 94c2641..174f650 100644

package/minidlna/minidlna.mk MINIDLNA_DEPENDENCIES = \ · line 18

Quoted 6 lines
package/minidlna/minidlna.mk +3 -0
@@ -13,13 +13,18 @@ MINIDLNA_DEPENDENCIES = \
 	ffmpeg flac libvorbis libogg libid3tag libexif libjpeg sqlite \
 	host-xutil_makedepend
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+MINIDLNA_FFMPEG_SSL_LIBS=-lcrypto -lssl
+endif

I don't think that's the right fix. Looking at config.log I see:

configure:9248: checking for avformat_open_input in -lavformat
configure:9273: /home/peko/source/buildroot/output/host/usr/bin/nios2-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L/usr/local/lib conftest.c -lavformat >&5
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/4.7.3/../../../../nios2-linux-gnu/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/4.7.3/../../../../nios2-linux-gnu/bin/ld: /home/peko/source/buildroot/output/host/usr/nios2-buildroot-linux-gnu/sysroot/usr/lib/crt1.o: undefined reference to symbol '_gp' /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/4.7.3/../../../../nios2-linux-gnu/bin/ld: note: '_gp' is defined in DSO /home/peko/source/buildroot/output/host/usr/nios2-buildroot-linux-gnu/sysroot/usr/lib/libssl.so.1.0.0 so try adding it to the linker command line /home/peko/source/buildroot/output/host/usr/nios2-buildroot-linux-gnu/sysroot/usr/lib/libssl.so.1.0.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status

I don't know anything about nios, but I believe _gp is a linker generated symbol:

http://sourceware-org.1504.n7.nabble.com/PATCH-2-4-MIPS-Linux-LD-Correct-the-definition-of-gp-td125740.html
https://lists.debian.org/debian-mips/2013/05/msg00018.html

Ezequiel, can you help please?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 minidlna: Fix configure ffmpeg detection when OpenSSL support is enabled

Quoted 30 lines · Peter Korsgaard
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> writes:

Fixes http://autobuild.buildroot.net/results/c66/c663a518f65e786895d9ad8866193f70cbd6e96d//

---
 package/minidlna/minidlna.mk |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/minidlna/minidlna.mk +0 -0
index 94c2641..174f650 100644

package/minidlna/minidlna.mk MINIDLNA_DEPENDENCIES = \ · line 18

Quoted 6 lines
package/minidlna/minidlna.mk +3 -0
@@ -13,13 +13,18 @@ MINIDLNA_DEPENDENCIES = \
     ffmpeg flac libvorbis libogg libid3tag libexif libjpeg sqlite \
     host-xutil_makedepend
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+MINIDLNA_FFMPEG_SSL_LIBS=-lcrypto -lssl
+endif

I don't think that's the right fix. Looking at config.log I see:

configure:9248: checking for avformat_open_input in -lavformat
configure:9273: /home/peko/source/buildroot/output/host/usr/bin/nios2-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L/usr/local/lib conftest.c -lavformat >&5
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/4.7.3/../../../../nios2-linux-gnu/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/4.7.3/../../../../nios2-linux-gnu/bin/ld: /home/peko/source/buildroot/output/host/usr/nios2-buildroot-linux-gnu/sysroot/usr/lib/crt1.o: undefined reference to symbol '_gp' /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/4.7.3/../../../../nios2-linux-gnu/bin/ld: note: '_gp' is defined in DSO /home/peko/source/buildroot/output/host/usr/nios2-buildroot-linux-gnu/sysroot/usr/lib/libssl.so.1.0.0 so try adding it to the linker command line /home/peko/source/buildroot/output/host/usr/nios2-buildroot-linux-gnu/sysroot/usr/lib/libssl.so.1.0.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status

Quoted 7 lines

I don't know anything about nios, but I believe _gp is a linker generated symbol:

http://sourceware-org.1504.n7.nabble.com/PATCH-2-4-MIPS-Linux-LD-Correct-the-definition-of-gp-td125740.html
https://lists.debian.org/debian-mips/2013/05/msg00018.html

Ezequiel, can you help please?

I'm by no means a compiler expert, but the error does indeed seem related to a compiler bug. Therefore, the proposed fix doesn't seem related to it.

If the fix is needed for minidlna, that's a different issue.

Regarding compiler bugs (we have a few already spotted), problem is we can't do much about these, as we're using an external toolchain provided by Code Sourcery.

The nios2 support in gcc/binutils is being worked out (maybe it's ready now). I plan to investigate that as soon as I finish with strace; once we get an upstream
for gcc issues, we'll be able to report anything we find.

Signature · 2 lines
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar