On Raspbian, two SDL library files must be linked to /usr/lib/

40 views
Skip to first unread message

Marcos Cruz

unread,
Feb 8, 2013, 1:38:40 PM2/8/13
to CanAce development group
In order to compile CanAce on Raspbian, the following links are needed:

ln -s /usr/lib/arm-linux-gnueabihf/libSDLmain.a /usr/lib
ln -s /usr/lib/arm-linux-gnueabihf/libSDL.so /usr/lib

Maybe there's a cleaner solution, but this one works.

Marcos

--
http://programandala.net

Lawrence Woodman

unread,
Feb 11, 2013, 2:19:45 AM2/11/13
to canac...@googlegroups.com
On 08/02/13 18:38, Marcos Cruz wrote:
> In order to compile CanAce on Raspbian, the following links are needed:
>
> ln -s /usr/lib/arm-linux-gnueabihf/libSDLmain.a /usr/lib
> ln -s /usr/lib/arm-linux-gnueabihf/libSDL.so /usr/lib
>
> Maybe there's a cleaner solution, but this one works.

Thanks for the warning.

I'm not sure why this directory isn't in the library path, but you could
add it by adding the following to /etc/ld.so.conf or create a file
called /etc/ld.so.conf.d/gnueabihf.conf with the following content.
Where to put it depends on whether your /etc/ld.so.conf includes files
from /etc/ld.so.conf.d/:
# Configuration for gnueabihf
/usr/lib/arm-linux-gnueabihf

Then, as root, run:
# ldconfig

Your would need to remove the symbolic links to test whether this has
worked.


bfn


Lorry

--
vLife Systems Ltd
Registered Office: The Meridian, 4 Copthall House, Station Square, Coventry, CV1 2FL
Registered in England and Wales No. 06477649
http://vlifesystems.com

Marcos Cruz

unread,
Feb 26, 2013, 9:36:54 AM2/26/13
to CanAce development group
En/Je/On 2013-02-11 07:19, Lawrence Woodman escribi� / skribis / wrote :

> >ln -s /usr/lib/arm-linux-gnueabihf/libSDLmain.a /usr/lib
> >ln -s /usr/lib/arm-linux-gnueabihf/libSDL.so /usr/lib
> >
> >Maybe there's a cleaner solution, but this one works.

> I'm not sure why this directory isn't in the library path, but you
> could add it by adding the following to /etc/ld.so.conf or create a
> file called /etc/ld.so.conf.d/gnueabihf.conf with the following
> content.

Thank you for the info. I didn't know how this works. Everything you say
seems properly configured by default, see:

My </etc/ld.so.conf> file:

include /etc/ld.so.conf.d/*.conf

My </etc/ld.so.conf.d/> dir:

00-vmcs.conf
arm-linux-gnueabihf.conf
libc.conf

My </etc/ld.so.conf/arm-linux-gnueabihf.conf> file:

# Multiarch support
/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabihf

> Then, as root, run:
> # ldconfig

> Your would need to remove the symbolic links to test whether this
> has worked.

It doesn't work without my symbolic links. 'make' fails with the message
"no rule to build the objective '/usr/lib/libSDLmain.a', needed by
'src/canace'".

I thougth the cause could be '/usr/lib/libSDLmain.a' is hardcoded in the
source. I tried this:

grep SDLmain src/*

The result was:

src/CMakeCache.txt:SDLMAIN_LIBRARY:FILEPATH=/usr/lib/arm-linux-gnueabihf/libSDLmain.a
src/CMakeCache.txt:SDL_LIBRARY:STRING=/usr/lib/arm-linux-gnueabihf/libSDLmain.a;/usr/lib/arm-linux-gnueabihf/libSDL.so;-lpthread
src/CMakeCache.txt:FIND_PACKAGE_MESSAGE_DETAILS_SDL:INTERNAL=[/usr/lib/arm-linux-gnueabihf/libSDLmain.a;/usr/lib/arm-linux-gnueabihf/libSDL.so;-lpthread][/usr/include/SDL][v()]
src/CMakeCache.txt:SDL_LIBRARY_TEMP:INTERNAL=/usr/lib/arm-linux-gnueabihf/libSDLmain.a;/usr/lib/arm-linux-gnueabihf/libSDL.so;-lpthread

I didn't investigate any further yet. Meanwhile I'll use the symbolic links.

Marcos

Lawrence Woodman

unread,
Feb 28, 2013, 3:07:33 PM2/28/13
to canac...@googlegroups.com
On 26/02/13 14:36, Marcos Cruz wrote:
> En/Je/On 2013-02-11 07:19, Lawrence Woodman escribi� / skribis / wrote :
> It doesn't work without my symbolic links. 'make' fails with the message
> "no rule to build the objective '/usr/lib/libSDLmain.a', needed by
> 'src/canace'".
>
> I thougth the cause could be '/usr/lib/libSDLmain.a' is hardcoded in the
> source. I tried this:
>
> grep SDLmain src/*
>
> The result was:
>
> src/CMakeCache.txt:SDLMAIN_LIBRARY:FILEPATH=/usr/lib/arm-linux-gnueabihf/libSDLmain.a
> src/CMakeCache.txt:SDL_LIBRARY:STRING=/usr/lib/arm-linux-gnueabihf/libSDLmain.a;/usr/lib/arm-linux-gnueabihf/libSDL.so;-lpthread
> src/CMakeCache.txt:FIND_PACKAGE_MESSAGE_DETAILS_SDL:INTERNAL=[/usr/lib/arm-linux-gnueabihf/libSDLmain.a;/usr/lib/arm-linux-gnueabihf/libSDL.so;-lpthread][/usr /include/SDL][v()]
> src/CMakeCache.txt:SDL_LIBRARY_TEMP:INTERNAL=/usr/lib/arm-linux-gnueabihf/libSDLmain.a;/usr/lib/arm-linux-gnueabihf/libSDL.so;-lpthread

I'm not sure about this, it does seem to be trying to statically link
libSDL. Now that you have ensured that ldconfig is configured properly,
you could try removing the symbolic links and re-running:
$ cmake .

then:
$ make

Maybe cmake, needs to see that you can now access the shared libraries.

But as I say it's only a stab in the dark.


Lorry

Marcos Cruz

unread,
Mar 3, 2013, 12:51:50 PM3/3/13
to CanAce development group
En/Je/On 2013-02-28 20:07, Lawrence Woodman escribi� / skribis / wrote :

> you could try removing the symbolic links and re-running:
> $ cmake .
> then:
> $ make

I already had tried. Same error. It's a mistery!

Marcos

--
http://programandala.net
Reply all
Reply to author
Forward
0 new messages