Troubles compiling VLC on Slackware

*nix specific usage questions
giancarlo
New Cone
New Cone
Posts: 3
Joined: 29 Nov 2005 21:39

Troubles compiling VLC on Slackware

Postby giancarlo » 29 Nov 2005 21:47

Hi to everybody!

I couldn't find answers to my problem, so I posted it here, hoping someone can help me. The error does not come if I --disable-hal in configure script. This is the message I receive:

Code: Select all

lib/libvlc.a(lib_libvlc_a-libvlc.o)(.text+0xa487): In function `InitDeviceValues': : undefined reference to `hal_initialize' lib/libvlc.a(lib_libvlc_a-libvlc.o)(.text+0xa49d): In function `InitDeviceValues': : undefined reference to `hal_get_all_devices' lib/libvlc.a(lib_libvlc_a-libvlc.o)(.text+0xa4b9): In function `InitDeviceValues': : undefined reference to `hal_free_string_array' lib/libvlc.a(lib_libvlc_a-libvlc.o)(.text+0xa4c1): In function `InitDeviceValues': : undefined reference to `hal_shutdown' lib/libvlc.a(lib_libvlc_a-libvlc.o)(.text+0xa4e4): In function `InitDeviceValues': : undefined reference to `hal_device_property_exists' lib/libvlc.a(lib_libvlc_a-libvlc.o)(.text+0xa50c): In function `InitDeviceValues': : undefined reference to `hal_device_get_property_bool' lib/libvlc.a(lib_libvlc_a-libvlc.o)(.text+0xa529): In function `InitDeviceValues': : undefined reference to `hal_device_get_property_string' lib/libvlc.a(lib_libvlc_a-libvlc.o)(.text+0xa567): In function `InitDeviceValues': : undefined reference to `hal_free_string' collect2: ld returned 1 exit status
HAL version is 0.5.5.1, self compiled. Things were the same with a previous pre-compiled version.

Any hint?
Thanks in advance!

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 30 Nov 2005 14:11

many hal fixes were commited to trunk recently. Could you try with latest source code ?
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

DeVries

Postby DeVries » 30 Nov 2005 16:03

Hi, reading the above post after a search on this forum for hal_initialize :-) I managed to compile vlc on slamd64 10.2 (~= 64-bit slackware 10.2)

I had been trying with release 0.8.4, until I read dionoea's post, but then I downloaded the Nov 29th snapshot for the hal fixes..

I'll just outline a couple of small further changes I needed to make to get it to compile (I can't claim it's a stable build, because I haven't tested it yet, apart from to play one asf file (from a mustek dv4000, which is why I'm desperate for vlc to work in the first place :-))

The problems I had were all wx related, and I seem to have wx_gtk-2.4 installed by hand from source, but I can't remember why! :oops: Maybe the compile would have worked without changes with vanilla slamd, I don't know.

Anyway, here's what I did, in case it's useful to anybody..

/modules/gui/wxwidgets/interface.cpp

In 3 places I changed

Code: Select all

wxSize ms = GetMinSize();
to

Code: Select all

#if ( wxCHECK_VERSION( 2,5,4 ) ) wxSize ms = GetMinSize(); #else wxSize ms = frame_sizer->GetMinSize(); #endif
(Just following the example from SetMinSize() nearby in the code - probably this should go into the source, I think!)

/modules/gui/wxwidgets/subtitles.hpp
/modules/gui/wxwidgets/preferences_widgets.hpp
/modules/gui/wxwidgets/streamout.hpp

In each of these I inserted a #include <wx/gtk/spinctrl.h> because the compiler was complaining about no definition for wxSpinCtrl (despite wx/spinctrl.h being #included in wxwidgets.hpp .. I've no idea why this should be..)

DeVries

Postby DeVries » 30 Nov 2005 16:14

Oops, I should probably include more info:

I had to install ffmpeg by hand to get round the postprocess problem. I installed ffmpeg-20051126, with

./configure --enable-gpl --enable-pp --enable-shared-pp --enable-shared --enable-mp3lame --enable-libogg --prefix=/usr --libdir=/usr/lib64 --enable-xvid --enable-vorbis --enable-theora --enable-faad --enable-faac --enable-faadbin

And before that, I compiled and installed xvidcore-1.1.0-beta2 with just

./configure --prefix=/usr --libdir=/usr/lib64

(from the Build directory)

After ffmpeg, I did the following configure for vlc:

./configure --prefix=/usr --libdir=/usr/lib64 --enable-dvdread --enable-dvdnav --enable-faad --enable-flac --enable-galaktos --disable-mkv

And put

Code: Select all

cflags_optim=" -march=k8 -msse2 -mfpmath=sse -ftracer -pipe -fPIC -O3 -ffast-math -funroll-loops"
in vlc_config (this is what I use to compile most things on this machine - it might not work on some x86_64 arch's)

DeVries

Postby DeVries » 30 Nov 2005 16:39

Hmm, having said all that, I notice vlc only runs from its own top-level directory in /usr/src/vlc-snapshot-XXXXXXXXX, because it's looking for a "modules" directory under the directory it's run from, and not in /usr/lib64/vlc, I guess. Oh well, not hard to fix by mv /usr/bin/vlc /usr/bin/vlc-bin, and making a little shell wrapper /usr/bin/vlc:

Code: Select all

#!/bin/sh cd /usr/lib64/vlc/ && /usr/bin/vlc-bin
and then cd /usr/lib64/vlc ; ln -s . modules

... but..! Is there a better way?!

giancarlo
New Cone
New Cone
Posts: 3
Joined: 29 Nov 2005 21:39

Resolved

Postby giancarlo » 30 Nov 2005 22:46

Downloading the svn snapshot resolved the compilation error.
Thanks a lot!


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

Who is online

Users browsing this forum: No registered users and 53 guests