Page 1 of 1
Can not build VLC on Mac OS X (libiconv)
Posted: 11 Mar 2013 15:30
by j_vlc
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
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!
Re: Can not build VLC on Mac OS X (libiconv)
Posted: 13 Mar 2013 11:41
by j_vlc
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,,,
Re: Can not build VLC on Mac OS X (libiconv)
Posted: 13 Mar 2013 11:46
by Jean-Baptiste Kempf
No, you should use the normal iconv built by VLC.
Re: Can not build VLC on Mac OS X (libiconv)
Posted: 13 Mar 2013 12:08
by j_vlc
How to specify to use the normal iconv? I'm following the wiki instructions...
Thank you very much for your help!!
Re: Can not build VLC on Mac OS X (libiconv)
Posted: 17 Mar 2013 03:28
by nkoriyama
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.
[SOLVED] Can not build VLC on Mac OS X (libiconv)
Posted: 19 Mar 2013 11:42
by j_vlc
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
Re: Can not build VLC on Mac OS X (libiconv)
Posted: 19 Mar 2013 12:31
by j_vlc
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...
Re: Can not build VLC on Mac OS X (libiconv)
Posted: 20 Mar 2013 15:58
by j_vlc
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!