Problem 1033 - 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: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: config (show other problems)
Version: 9.1
Hardware: Other Linux
: P5 minor
Assignee: Gunter.Folger
URL:
Depends on:
Blocks:
 
Reported: 2008-11-10 10:15 CET by blyth
Modified: 2011-03-18 16:17 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description blyth 2008-11-10 10:15:40 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

-Simon
Comment 1 Gunter.Folger 2011-03-18 16:17:13 CET
 fixed in 9.4 ref03