Problem 1031 - library path length limitation of 128 characters, leads to silent truncation of lib list
Summary: library path length limitation of 128 characters, leads to silent truncation ...
Status: CLOSED FIXED
Alias: None
Product: Bugzilla
Classification: Unclassified
Component: general (show other problems)
Version: other
Hardware: All All
: P5 trivial
Assignee: Koichi Murakami
URL:
Depends on:
Blocks:
 
Reported: 2008-11-06 07:43 CET by Koichi Murakami
Modified: 2008-11-10 10:06 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Koichi Murakami 2008-11-06 07:43:22 CET
Relative paths lead to full link line with all libs :

./liblist -m . < libname.map | tr " " "\n" | wc
## 110 libs
Comment 1 Koichi Murakami 2008-11-06 07:45:08 CET
Relative paths lead to full link line with all libs :

./liblist -m . < libname.map | tr " " "\n" | wc
## 110 libs

Absolute -m path that is over 85-90 characters in length (max lib length
is 40 chars) leads to silent truncation of libs listed on the link line.

./liblist -m $PWD < libname.map | tr " " "\n" | wc
## 36 libs

From the config/liblist.c code it is clearly due to the use of
char libname[128]

Clearly the workaround is to use relative paths, but nevertheless ... a trivial fix could avoid others the chore of tracking this down in future.

Also using a really long path, will cause it to segment...

p=/data/env/local/dyb/releases/1.0.0-rc0

Comment 2 Koichi Murakami 2008-11-06 07:50:09 CET
p=dyb/releases/1.0.0-rc01/Nu-Wa-
geant4/4.9.1.p01/
uncharacterized

Comment 3 Koichi Murakami 2008-11-10 10:06:27 CET
Relative paths lead to full link line with all libs :

./liblist -m . < libname.map | tr " " "\n" | wc
## 110 libs

Absolute -m path that is over 85-90 characters in length (max lib length
is 40 chars) leads to silent truncation of libs listed on the link line.

./liblist -m $PWD < libname.map | tr " " "\n" | wc
## 36 libs

From the config/liblist.c code it is clearly due to the use of
char libname[128]

Clearly the workaround is to use relative paths, but nevertheless ... a trivial fix could avoid others the chore of tracking this down in future.

Also using a really long path, will cause it to segment...

p=/data/env/local/dyb/releases/1.0.0-rc01/NuWa-1.0.0-rc01/../external/geant4/4.9.1.p01/uncharacterized_linux_debug/lib

$p/liblist -m $p < $p/libname.map
Segmentation fault