cornel90 / ffmpegthumbnailer

Automatically exported from code.google.com/p/ffmpegthumbnailer
GNU General Public License v2.0
0 stars 0 forks source link

Symbol not found: _png_create_write_struct #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ffmpegthumbnailer -i file -o outfile.png
2.
3.

What is the expected output? What do you see instead?
Expected a png file
Received 

dyld: lazy symbol binding failed: Symbol not found: _png_create_write_struct
  Referenced from: /usr/local/lib/libffmpegthumbnailer.4.dylib
  Expected in: flat namespace

dyld: Symbol not found: _png_create_write_struct
  Referenced from: /usr/local/lib/libffmpegthumbnailer.4.dylib
  Expected in: flat namespace

Trace/BPT trap

What version of the product are you using? On what operating system?
Latest from source on OSX 10.6

Please provide any additional information below.
Libpng is installed, also attempted to install from source. Doxygen, graphviz 
use the libpng install and work correctly.

Original issue reported on code.google.com by dekz...@gmail.com on 14 Aug 2010 at 7:32

GoogleCodeExporter commented 9 years ago
what's the output of: nm -D /usr/lib/libpng.so | grep create_write

Assuming /usr/lib is your lib directory.

Original comment by dirk.vdb on 14 Aug 2010 at 8:02

GoogleCodeExporter commented 9 years ago
I have libpng.dylib located in /usr/X11/lib/libpng.dylib 

nm  /usr/X11/lib/libpng.dylib | grep create_write
000000000000d9f3 T _png_create_write_struct
000000000000d756 T _png_create_write_struct_2

Is that applicable? 

There is also a libpng.dylib which is a symlink to libpng12.0.dylib which 
reports

nm  /opt/local/lib/libpng.dylib | grep create_write
000000000000fbe0 T _png_create_write_struct
000000000000f900 T _png_create_write_struct_2

Original comment by dekz...@gmail.com on 14 Aug 2010 at 8:22

GoogleCodeExporter commented 9 years ago
Did previous versions work?
What happens if you configure with --disable-as-needed 

Original comment by dirk.vdb on 14 Aug 2010 at 8:27

GoogleCodeExporter commented 9 years ago
This is the first version I've tried.

Is that the right arg --disable-as-needed? configure: WARNING: unrecognized 
options: --disable-as-needed

Original comment by dekz...@gmail.com on 14 Aug 2010 at 8:36

GoogleCodeExporter commented 9 years ago
Are you using version 2.0.4?

Original comment by dirk.vdb on 14 Aug 2010 at 8:39

GoogleCodeExporter commented 9 years ago
Yeah 2.0.4 from the source provided in the Downloads section. Running 
./configure --disable-as-needed runs and reports this

configure: WARNING: unrecognized options: --disable-as-needed

CONFIGURATION SUMMARY ----
png support         : enabled

Original comment by dekz...@gmail.com on 14 Aug 2010 at 8:47

GoogleCodeExporter commented 9 years ago
Right, that option is not in the release yet. It's only in the code in 
subversion. Can you try the code from subversion?

Original comment by dirk.vdb on 14 Aug 2010 at 8:52

GoogleCodeExporter commented 9 years ago
Running from the latest checkout from SVN:

./autogen.sh 
Running autoreconf...
aclocal:configure.ac:14: warning: macro `AM_SILENT_RULES' not found in library
aclocal:configure.ac:14: warning: macro `AM_SILENT_RULES' not found in library
configure.ac:14: error: possibly undefined macro: AM_SILENT_RULES
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /sw/bin/autoconf-2.63 failed with exit status: 1

Original comment by dekz...@gmail.com on 14 Aug 2010 at 8:58

GoogleCodeExporter commented 9 years ago
You have an old version of autotools, remove line 14 in configure.ac and it 
should work (AM_SILENT_RULES)

Original comment by dirk.vdb on 14 Aug 2010 at 9:01

GoogleCodeExporter commented 9 years ago
Seems to be the exact after ./configure --disable-as-needed. No more warnings 
about the option but a few warnings on 
ld: warning: in /sw/lib/libavcodec.dylib, file was built for i386 which is not 
the architecture being linked (x86_64)

None on libpng though. 

Still resulting in Symbol not found: _png_create_write_struct when running. 

Original comment by dekz...@gmail.com on 14 Aug 2010 at 9:08

GoogleCodeExporter commented 9 years ago
Hmm, I don't think it's a good idea to mix 32 and 64 bit libraries. You should 
probably compile ffmpegthumbnailer as a 32 bit application instead of 64 bit.

Original comment by dirk.vdb on 14 Aug 2010 at 9:12

GoogleCodeExporter commented 9 years ago
Sorry sort of new to configur scripts. Is this usually correct? ./configure 
--target=i386-apple-darwin8.0.0 --disable-as-needed

It seems to configure fine but then the make has problems: 

ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [ffmpegthumbnailer] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

-------

Undefined symbols:
  "_av_free_packet", referenced from:
      ffmpegthumbnailer::MovieDecoder::getVideoPacket()       in libffmpegthumbnailer.a(libffmpegthumbnailer_la-moviedecoder.o)
      ffmpegthumbnailer::MovieDecoder::getVideoPacket()       in libffmpegthumbnailer.a(libffmpegthumbnailer_la-moviedecoder.o)

etc

Original comment by dekz...@gmail.com on 14 Aug 2010 at 9:23

GoogleCodeExporter commented 9 years ago
The configure line seems ok, but it seems like it can't find the ffmpeg 
libraries. I need the linker output to make something out of it.

Original comment by dirk.vdb on 14 Aug 2010 at 9:30

GoogleCodeExporter commented 9 years ago
I've attached all output I receive from configuring and making. 

Original comment by dekz...@gmail.com on 14 Aug 2010 at 10:16

Attachments:

GoogleCodeExporter commented 9 years ago
So make succeeds? You didn't do a make clean so I still can't see the build 
output.

Original comment by dirk.vdb on 14 Aug 2010 at 3:11

GoogleCodeExporter commented 9 years ago
Even though I've specifically given configure the args ./configure 
--target=i386-apple-darwin8.0.0 --disable-as-needed

It still is giving me warnings about file was built for i386 which is not the 
architecture being linked (x86_64).

Everything succeeds though there are no errors until I then run 

Original comment by dekz...@gmail.com on 15 Aug 2010 at 12:56

GoogleCodeExporter commented 9 years ago
I have never tried to compile ffmoegthumbnailer on a mac, but it seems to me 
that something is wrong with your build environment. Can't really help you any 
further with this.

Original comment by dirk.vdb on 19 Aug 2010 at 2:58

GoogleCodeExporter commented 9 years ago

Original comment by dirk.vdb on 2 Nov 2010 at 7:56