problem with compiling for arm linux platform?

*nix specific usage questions
billchen
New Cone
New Cone
Posts: 4
Joined: 07 Aug 2009 07:55

problem with compiling for arm linux platform?

Postby billchen » 07 Aug 2009 08:08

hi,all
i try to cross compile the vlc-1.0.0 for arm-linux , and come across with problem.

./configure --host=arm-linux CC=arm-linux-gcc --disable-hal --disable-dvd --disable-vcd --disable-dvd --disable-directfb --disable-x11 --disable-dbus --disable-skins2 --disable-qt4 --disable-libgcrypt --disable-remoteosd --disable-telx

make

chen@chen-desktop:~/vlc/vlc-1.0.0/bin$ arm-linux-gcc -std=gnu99 -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DMODULE_NAME=vlc -DMODULE_NAME_IS_vlc -DMODULE_STRING=\"vlc\" -O2 -ffast-math -funroll-loops -fomit-frame-pointer -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -o .libs/vlc vlc.o ../src/.libs/libvlc.so
/opt/Embedix/tools/arm-linux/bin/../lib/gcc/arm-linux/3.4.5/../../../../arm-linux/bin/ld: warning: libvlccore.so.2, needed by ../src/.libs/libvlc.so, not found (try using -rpath or -rpath-link)
vlc.o(.text+0x138): In function `main':
: undefined reference to `FromLocale'
vlc.o(.text+0x17c): In function `main':
: undefined reference to `FromLocale'
vlc.o(.text+0x19c): In function `main':
: undefined reference to `FromLocale'
vlc.o(.text+0x1c8): In function `main':
: undefined reference to `FromLocale'
vlc.o(.text+0x1e8): In function `main':
: undefined reference to `FromLocale'
vlc.o(.text+0x208): more undefined references to `FromLocale' follow
vlc.o(.text+0x368): In function `main':
: undefined reference to `LocaleFree'
vlc.o(.text+0x3b0): In function `main':
: undefined reference to `LocaleFree'
vlc.o(.text+0x3bc): In function `main':
: undefined reference to `LocaleFree'
vlc.o(.text+0x3c8): In function `main':
: undefined reference to `LocaleFree'
vlc.o(.text+0x3d4): In function `main':
: undefined reference to `LocaleFree'
vlc.o(.text+0x3e0): more undefined references to `LocaleFree' follow
../src/.libs/libvlc.so: undefined reference to `input_Control'
../src/.libs/libvlc.so: undefined reference to `vlc_cond_broadcast'
../src/.libs/libvlc.so: undefined reference to `vlc_gettext'
../src/.libs/libvlc.so: undefined reference to `playlist_Status'
../src/.libs/libvlc.so: undefined reference to `module_get_name'
../src/.libs/libvlc.so: undefined reference to `var_GetChecked'
../src/.libs/libvlc.so: undefined reference to `input_item_IsPreparsed'
../src/.libs/libvlc.so: undefined reference to `vlc_event_detach'
../src/.libs/libvlc.so: undefined reference to `vlc_object_find_name'
../src/.libs/libvlc.so: undefined reference to `vlc_hold'
../src/.libs/libvlc.so: undefined reference to `__vlc_object_detach'
../src/.libs/libvlc.so: undefined reference to `__var_TriggerCallback'
../src/.libs/libvlc.so: undefined reference to `__var_Change'
../src/.libs/libvlc.so: undefined reference to `vlm_Control'
../src/.libs/libvlc.so: undefined reference to `vlc_clone'
../src/.libs/libvlc.so: undefined reference to `vlc_threadvar_get'
../src/.libs/libvlc.so: undefined reference to `vlc_sd_Create'
../src/.libs/libvlc.so: undefined reference to `module_exists'
../src/.libs/libvlc.so: undefined reference to `vlc_threadvar_delete'
../src/.libs/libvlc.so: undefined reference to `osd_ShowTextAbsolute'
../src/.libs/libvlc.so: undefined reference to `playlist_AssertLocked'
../src/.libs/libvlc.so: undefined reference to `playlist_CurrentInput'
../src/.libs/libvlc.so: undefined reference to `libvlc_InternalDestroy'
../src/.libs/libvlc.so: undefined reference to `__var_Set'
../src/.libs/libvlc.so: undefined reference to `vlc_mutex_destroy'
../src/.libs/libvlc.so: undefined reference to `__vlc_object_release'
../src/.libs/libvlc.so: undefined reference to `__var_Type'
../src/.libs/libvlc.so: undefined reference to `input_GetItem'
../src/.libs/libvlc.so: undefined reference to `__msg_Generic'
../src/.libs/libvlc.so: undefined reference to `mdate'
../src/.libs/libvlc.so: undefined reference to `module_list_free'
../src/.libs/libvlc.so: undefined reference to `__config_PutPsz'
../src/.libs/libvlc.so: undefined reference to `vlc_cond_init'
../src/.libs/libvlc.so: undefined reference to `playlist_Lock'
../src/.libs/libvlc.so: undefined reference to `__input_item_NewExt'
../src/.libs/libvlc.so: undefined reference to `__var_AddCallback'
../src/.libs/libvlc.so: undefined reference to `input_Stop'
../src/.libs/libvlc.so: undefined reference to `vlc_release'
../src/.libs/libvlc.so: undefined reference to `libvlc_InternalCleanup'
../src/.libs/libvlc.so: undefined reference to `VLC_Compiler'
../src/.libs/libvlc.so: undefined reference to `module_get_object'
../src/.libs/libvlc.so: undefined reference to `input_Start'
../src/.libs/libvlc.so: undefined reference to `__vlc_thread_join'
../src/.libs/libvlc.so: undefined reference to `__aout_VolumeMute'
../src/.libs/libvlc.so: undefined reference to `vlc_sd_Start'
../src/.libs/libvlc.so: undefined reference to `libvlc_InternalInit'
../src/.libs/libvlc.so: undefined reference to `VLC_Version'
../src/.libs/libvlc.so: undefined reference to `vout_ShowTextAbsolute'
../src/.libs/libvlc.so: undefined reference to `services_discovery_EventManager'
../src/.libs/libvlc.so: undefined reference to `__var_Create'
../src/.libs/libvlc.so: undefined reference to `__vlm_New'
../src/.libs/libvlc.so: undefined reference to `vlc_cond_destroy'
../src/.libs/libvlc.so: undefined reference to `__aout_VolumeSet'
../src/.libs/libvlc.so: undefined reference to `vlc_threadvar_create'
../src/.libs/libvlc.so: undefined reference to `__aout_VolumeGet'
../src/.libs/libvlc.so: undefined reference to `playlist_PreparseEnqueue'
../src/.libs/libvlc.so: undefined reference to `config_FindConfig'
../src/.libs/libvlc.so: undefined reference to `playlist_AskForArtEnqueue'
../src/.libs/libvlc.so: undefined reference to `services_discovery_GetLocalizedName'
../src/.libs/libvlc.so: undefined reference to `__var_Destroy'
../src/.libs/libvlc.so: undefined reference to `playlist_CurrentPlayingItem'
../src/.libs/libvlc.so: undefined reference to `playlist_Unlock'
../src/.libs/libvlc.so: undefined reference to `input_item_AddOption'
../src/.libs/libvlc.so: undefined reference to `vlc_threadvar_set'
../src/.libs/libvlc.so: undefined reference to `vlc_mutex_init'
../src/.libs/libvlc.so: undefined reference to `vlc_mutex_init_recursive'
../src/.libs/libvlc.so: undefined reference to `vlc_join'
../src/.libs/libvlc.so: undefined reference to `module_list_get'
../src/.libs/libvlc.so: undefined reference to `__vlc_object_hold'
../src/.libs/libvlc.so: undefined reference to `var_SetChecked'
../src/.libs/libvlc.so: undefined reference to `__config_PutInt'
../src/.libs/libvlc.so: undefined reference to `playlist_Clear'
../src/.libs/libvlc.so: undefined reference to `vlc_mutex_lock'
../src/.libs/libvlc.so: undefined reference to `vout_GetSnapshot'
../src/.libs/libvlc.so: undefined reference to `__input_Create'
../src/.libs/libvlc.so: undefined reference to `__vlc_event_attach'
../src/.libs/libvlc.so: undefined reference to `vlm_Delete'
../src/.libs/libvlc.so: undefined reference to `__input_Read'
../src/.libs/libvlc.so: undefined reference to `__var_Get'
../src/.libs/libvlc.so: undefined reference to `vlc_sd_Stop'
../src/.libs/libvlc.so: undefined reference to `libvlc_InternalCreate'
../src/.libs/libvlc.so: undefined reference to `vlc_cond_wait'
../src/.libs/libvlc.so: undefined reference to `playlist_DeleteFromInput'
../src/.libs/libvlc.so: undefined reference to `input_item_GetDuration'
../src/.libs/libvlc.so: undefined reference to `__vlc_object_find'
../src/.libs/libvlc.so: undefined reference to `input_item_GetURI'
../src/.libs/libvlc.so: undefined reference to `module_provides'
../src/.libs/libvlc.so: undefined reference to `vlc_mutex_unlock'
../src/.libs/libvlc.so: undefined reference to `libvlc_InternalWait'
../src/.libs/libvlc.so: undefined reference to `playlist_ItemGetByInputId'
../src/.libs/libvlc.so: undefined reference to `playlist_Control'
../src/.libs/libvlc.so: undefined reference to `msg_Subscribe'
../src/.libs/libvlc.so: undefined reference to `msg_Unsubscribe'
../src/.libs/libvlc.so: undefined reference to `playlist_AddExt'
../src/.libs/libvlc.so: undefined reference to `input_item_GetMeta'
../src/.libs/libvlc.so: undefined reference to `__var_DelCallback'
../src/.libs/libvlc.so: undefined reference to `config_GetUserDataDir'
../src/.libs/libvlc.so: undefined reference to `vlc_cond_signal'
../src/.libs/libvlc.so: undefined reference to `vlc_cancel'
../src/.libs/libvlc.so: undefined reference to `libvlc_InternalAddIntf'
collect2: ld returned 1 exit status

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: problem with compiling for arm linux platform?

Postby Rémi Denis-Courmont » 07 Aug 2009 15:46

You cannot build libvlc before you built libvlccore.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

kcleung
New Cone
New Cone
Posts: 8
Joined: 25 Sep 2008 06:20

Re: problem with compiling for arm linux platform?

Postby kcleung » 12 Aug 2009 12:35

You cannot build libvlc before you built libvlccore.
How do you arrange the order of building these libraries?

For me, I had this error (also cross-compiling, for ARM target on AMD64 host) and a quick workaround is to configure with "--disable-shared --enable-static"

curgan
New Cone
New Cone
Posts: 5
Joined: 07 Sep 2009 21:33

Re: problem with compiling for arm linux platform?

Postby curgan » 09 Sep 2009 20:29

Hi

Also you should need libiconv.

Cheers

Rasfunk
New Cone
New Cone
Posts: 3
Joined: 02 Aug 2007 16:42

Re: problem with compiling for arm linux platform?

Postby Rasfunk » 25 Nov 2009 13:19

I have the very same problem. Is there any solution? Static linking works, but does not find the plug-ins when running on the target.

How to change vlc/vlccore build order?

Thanks a lot.

Rasfunk
New Cone
New Cone
Posts: 3
Joined: 02 Aug 2007 16:42

Re: problem with compiling for arm linux platform?

Postby Rasfunk » 25 Nov 2009 16:37

Okay, I guess I solved this one.

The build order is not a problem. It's the library paths. Basically, configure and/or make partly ignore the paths that I provide for libraries such as libiconv. It doesn't even search it's own ./src/.libs directory. That's why it can't find the library.

The solution is to copy all relevant libraries to the "--prefix"/lib folder (including the build's own ./src/.libs dir). After that, it compiles and runs on the target.

caldo_de_cana
New Cone
New Cone
Posts: 1
Joined: 11 Jan 2010 21:01

Re: problem with compiling for arm linux platform?

Postby caldo_de_cana » 11 Jan 2010 21:09

I have stumbled upon the same issue. I believe this may be a bug in binutils. I have compiled the exact same configuration for i686 and arm, logged all of "make", and diffed them. It turns out they both do the exact same thing and run the same command (well, duh, that was expected), but the arm binutils is
2.17.50.20070611 and the i686 binutils is 2.18.0.20080103.

arm_v5t_le-gcc -std=gnu99 -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DMODULE_NAME=vlc -DMODULE_NAME_IS_vlc -DMODULE_STRING=\"vlc\" -O4 -ffast-math -funroll-loops -fomit-frame-pointer -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -Wl,-z -Wl,defs -Wl,-z -Wl,defs -o .libs/vlc vlc.o -Wl,-rpath,../src/.libs ../src/.libs/libvlc.so -lrt -lpthread -ldl -lm

If I add that rpath above, it links fine.

Rasfunk, kcleung, billchen, what binutils version are you using? (self-compiled, from binary package, ...?)

yfwong
Blank Cone
Blank Cone
Posts: 18
Joined: 14 Dec 2006 03:56

Re: problem with compiling for arm linux platform?

Postby yfwong » 19 Jan 2010 11:01

Try to modify bin/Makefile. It works for me.
vlc_LDADD = ../src/libvlc.la `$(VLC_CONFIG) -libs vlc` $(am__append_2)
change to
vlc_LDADD = ../src/libvlccore.la ../src/libvlc.la `$(VLC_CONFIG) -libs vlc` $(am__append_2)

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: problem with compiling for arm linux platform?

Postby Rémi Denis-Courmont » 21 Jan 2010 19:16

This bug is fixed in VLC 1.0-bugfix and 1.0.5.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 19 guests