: in path makes troubles with LD_LIBRARY_PATH

Bug #1056863 reported by Removed by request
6
Affects Status Importance Assigned to Milestone
eglibc
New
Undecided
Unassigned
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

I'm using Ubuntu 12.10 dev and if a path contains a : (like '/usr/local/games/Superbrothers: Sword & Sworcery EP/lib') LD_LIBRARY_PATH will split it in 2 paths because : is a separator for LD_LIBRARY_PATH ('/usr/local/games/Superbrothers' and ' Sword & Sworcery EP/lib').

I have tried to escape the : (LD_LIBRARY_PATH='/usr/local/games/Superbrothers\: Sword & Sworcery EP/lib') and used single quotes for it (LD_LIBRARY_PATH="'/usr/local/games/Superbrothers: Sword & Sworcery EP/lib'") but it hasn't worked. I think there should be a way to escape the : somehow for LD_LIBRARY_PATH.

affects: busybox (Ubuntu) → ubuntu
Revision history for this message
Book 'em Dano (heymrdjd) wrote :

Whatever is enclosed in the single quotes wil be interpretted literally, so you either use the quotes or the escape character. I think you should use only one set of quotes or if you are going to use the escape character, you have to use it throughout the whole path wherever needed, i.e. /usr/local/games/Superbrothers\:\ Sword\ \&\ Sworcery\ EP/lib

Revision history for this message
Removed by request (removed3425744) wrote :

> /usr/local/games/Superbrothers\:\ Sword\ \&\ Sworcery\ EP/lib

Even this way LD_LIBRARY_PATH is interpreted with 2 paths. To test this I have copied a needed library to "/usr/local/games/Superbrothers" and it was really loaded at this place.

Revision history for this message
Book 'em Dano (heymrdjd) wrote :

Perhaps you could create a symbolic link whose file name contains no non-alphanumeric characters and points to the lib folder, then add the symbolic link to the library path variable.
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Removed by request (removed3425744) wrote :

I have created a symlink to the directory (ln -s '/usr/local/games/Superbrothers: Sword & Sworcery EP/lib' /test) and added it to LD_LIBRARY_PATH (export LD_LIBRARY_PATH=/test). The game works with it but this is more like a workaround.

Revision history for this message
Stephen M. Webb (bregma) wrote :

The ELF loader simply does not handle embedded colons or semicolons in the LD_LIBRARY_PATH string. It is not possible to escape them using a backslash.

Changed in ubuntu:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.