shshankjain / webm

Automatically exported from code.google.com/p/webm
0 stars 0 forks source link

link error on Mac - _fopen$UNIX2003 #185

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected behavior?
link new libvpx into ffmpeg

What do you see instead?
Undefined symbols:
  "_fopen$UNIX2003", referenced from:
      _vp8_write_yuv_frame in libvpx.a(onyx_if.c.o)

What version are you using?
v0.9.2-35-ga8a38bc

On what operating system?
Mac

Can you reproduce using the ivfdec or ivfenc tools?
No
What command line are you using?
I used a try bot
gcl try    roll_ffmpeg_sept09

Please provide any additional information below.

Original issue reported on code.google.com by fbarch...@chromium.org on 23 Sep 2010 at 9:45

GoogleCodeExporter commented 9 years ago
I suggest wrapping the function with an ifdef

#ifdef OUTPUT_YUV_SRC
void vp8_write_yuv_frame(const char *name, YV12_BUFFER_CONFIG *s)
...

Original comment by fbarch...@chromium.org on 23 Sep 2010 at 9:51

GoogleCodeExporter commented 9 years ago
http://cocoawithlove.com/2009/09/building-for-earlier-os-versions-in.html

Original comment by ya...@google.com on 23 Sep 2010 at 10:19

GoogleCodeExporter commented 9 years ago
Thanks yaowu-- found about the same on an Intel forum.  Updating the libvpx mac 
build for chromium, and rerolling/trybotting

Original comment by tomfine...@google.com on 24 Sep 2010 at 12:02

GoogleCodeExporter commented 9 years ago
This is an artifact of building using ICC or building on Snow Leopard, 
depending on how you want to look at it.

When building for the darwinN-gcc targets, the libvpx build system sets the 
-isysroot and -mmacosx-version-min parameters depending on the minimum OSX 
version you're trying to target. This is what you're choosing when you specify 
darwin8 or darwin9.

When building for darwinN-icc, those flags are not added. I don't know off-hand 
if icc supports them or not, they're Apple extensions, and they don't seem to 
be listed in the --help. (Tom, let me know if this is what you tried wrt 
comment #3) So the build defaults to the current machine's SDK, which is Snow 
Leopard in this case, and you risk link problems if you try to link with an 
older SDK.

This issue isn't limited to fopen, I've seen it before with other symbols. Same 
underlying issue as #166, building against the wrong runtime lib.

Tom, let us know what you tried and how you make out.

Original comment by jkoles...@google.com on 24 Sep 2010 at 1:49

GoogleCodeExporter commented 9 years ago
I added -isysroot and -mmacosx-version-min, which are supported by icc.  

At present I'm blocked due to other build issues that are currently preventing 
the buildbots from reaching the final link step on ffmpegsumo.  An additional 
problem at this point is that the defensive path has been taken and the fopen 
calls have been wrapped in if 0's via use of an ugly patch stored alongside the 
libvpx snapshot in chromium.  In other words, this working after having made 
two changes isn't going to tell us anything.

Original comment by tomfine...@google.com on 24 Sep 2010 at 3:28

GoogleCodeExporter commented 9 years ago
https://review.webmproject.org/599

Original comment by jkoles...@google.com on 24 Sep 2010 at 3:41

GoogleCodeExporter commented 9 years ago
The Mac link error is gone, so one way (-isysroot and -mmacosx-version-min) or 
another (removing fopen) the code works.

Original comment by fbarch...@chromium.org on 28 Sep 2010 at 6:48

GoogleCodeExporter commented 9 years ago

Original comment by jkoles...@google.com on 28 Sep 2010 at 8:09

GoogleCodeExporter commented 9 years ago

Original comment by albe...@google.com on 8 Mar 2012 at 12:10