Can not build VLC on Mac OS X (libiconv)

This forum is about all development around libVLC.
j_vlc
Blank Cone
Blank Cone
Posts: 16
Joined: 11 Mar 2013 13:03

Can not build VLC on Mac OS X (libiconv)

Postby j_vlc » 11 Mar 2013 15:30

I'm trying to compile VLC in my mac following this instructions: http://wiki.videolan.org/OSXCompile

Xcode 4.6
OS X 10.7

When I run

Code: Select all

../extras/package/macosx/build.sh
I have this error:

Code: Select all

Undefined symbols for architecture x86_64: "_iconv", referenced from: __nl_find_msg in libintl.a(dcigettext.o) (maybe you meant: _vlc_iconv_open, _vlc_iconv_close , _vlc_iconv ) "_iconv_open", referenced from: __nl_find_msg in libintl.a(dcigettext.o) (maybe you meant: _vlc_iconv_open) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [libvlccore.la] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
I have installed libiconv from MacPorts but.. How to specify to this script to search for libraries in /opt/local??
Thanks!

j_vlc
Blank Cone
Blank Cone
Posts: 16
Joined: 11 Mar 2013 13:03

Re: Can not build VLC on Mac OS X (libiconv)

Postby j_vlc » 13 Mar 2013 11:41

I have tryied to execute
$ export CFLAGS="-I/opt/local/include -L/opt/local/lib -liconv" ; export CXXFLAGS=$CFLAGS ; export LDFLAGS=$CFLAGS

Before run build.sh, but the libraries are not found, the same problem,,,

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Can not build VLC on Mac OS X (libiconv)

Postby Jean-Baptiste Kempf » 13 Mar 2013 11:46

No, you should use the normal iconv built by VLC.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

j_vlc
Blank Cone
Blank Cone
Posts: 16
Joined: 11 Mar 2013 13:03

Re: Can not build VLC on Mac OS X (libiconv)

Postby j_vlc » 13 Mar 2013 12:08

How to specify to use the normal iconv? I'm following the wiki instructions...
Thank you very much for your help!!

nkoriyama
Cone that earned his stripes
Cone that earned his stripes
Posts: 338
Joined: 01 Sep 2011 20:50
VLC version: git
Operating System: Windows / Mac OS X
Location: Japan

Re: Can not build VLC on Mac OS X (libiconv)

Postby nkoriyama » 17 Mar 2013 03:28

Old versions VLC used libiconv built by VLC.
Current versions use the system libiconv in the /usr/lib.

If you use the system libiconv, the problem will be solved.

Code: Select all

% otool -L /Applications/VLC.app/Contents/MacOS/lib/libvlccore.dylib /Applications/VLC.app/Contents/MacOS/lib/libvlccore.dylib: @loader_path/lib/libvlccore.5.dylib (compatibility version 6.0.0, current version 6.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.18.0) % nm -g /usr/lib/libiconv.2.dylib | grep _iconv 00000000000f26c0 S ___iconv_2VersionNumber 00000000000f2690 S ___iconv_2VersionString 0000000000002f1f T _iconv 000000000000325d T _iconv_canonicalize 0000000000002f41 T _iconv_close 0000000000001c59 T _iconv_open 0000000000002f4e T _iconvctl 0000000000003064 T _iconvlist
You can specify libiconv search path when configuring VLC like "configure --with-libiconv-prefix=/usr".
Or uninstall MacPorts' libiconv.
How To Ask Questions The Smart Way http://www.catb.org/~esr/faqs/smart-questions.html
My hack for ISDB-T http://sdrv.ms/126weue

j_vlc
Blank Cone
Blank Cone
Posts: 16
Joined: 11 Mar 2013 13:03

[SOLVED] Can not build VLC on Mac OS X (libiconv)

Postby j_vlc » 19 Mar 2013 11:42

Hi @nkoriyama, thank you very much for your help.

The problem was the macports libraries. As a quick solution I was renamed the "/opt" folder to "/_opt" and the "../extras/package/macosx/build.sh" works correctly

j_vlc
Blank Cone
Blank Cone
Posts: 16
Joined: 11 Mar 2013 13:03

Re: Can not build VLC on Mac OS X (libiconv)

Postby j_vlc » 19 Mar 2013 12:31

Another question.. When I run vlc I get:

Code: Select all

[0x7fa3a5013390] main interface error: no suitable interface module [0x7fa3a3c0a5c0] main libvlc error: interface "default" initialization failed
Wht I haven't got a GUI? I need it to test my module...

j_vlc
Blank Cone
Blank Cone
Posts: 16
Joined: 11 Mar 2013 13:03

Re: Can not build VLC on Mac OS X (libiconv)

Postby j_vlc » 20 Mar 2013 15:58

Solved, to build VLC, with GUI, ensure that macports is not installed (rename "/opt" to "/_opt" if you don't want to lost your ports) and execute this command:

Code: Select all

$ export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc && \ export CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ && \ export OBJC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc && \ git clone git://git.videolan.org/vlc.git && \ cd vlc && mkdir build && cd build && \ ../extras/package/macosx/build.sh && \ make VLC-dev.app
To run VLC with GUI:

Code: Select all

$ ./VLC-dev.app/Contents/MacOS/VLC
Thank you very much to the people of the forum/irc for their help!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests