#2246 using --program-prefix makes installation fail

open
nobody
Tools
5
2014-08-14
2014-02-02
Kio
No

when building sdcc from source final make install fails if option --program-prefix was given to ./configure; e.g.:

./configure --prefix=/tmp --program-prefix=sdcc330 --disable-mcs51-port --disable-z180-port --disable-r2k-port --disable-r3ka-port --disable-gbz80-port --disable-ds390-port --disable-ds400-port --disable-pic14-port --disable-pic16-port --disable-tlcs90-port --disable-stm8-port --disable-pic18-port --disable-hc08-port --disable-s08-port --disable-ucsim --disable-sdcdb

the resulting error during make install:

/usr/bin/install -c -d /tmp/bin
/usr/bin/install -c ../../bin/sdasz80 echo /tmp/bin/sdasz80|sed 's&^&sdcc330&'
install: sdcc330/tmp/bin/sdasz80: No such file or directory
make[1]: *** [install] Error 71
cp -p ../../bin/sdld ../../bin/sdldgb
cp -p ../../bin/sdld ../../bin/sdld6808
/usr/bin/install -c -d /tmp/bin
for ld in ../../bin/sdld ../../bin/sdldz80 ../../bin/sdldgb ../../bin/sdld6808; \ do \ /usr/bin/install -c $ld echo /tmp/bin/\basename $ld` | sed 's&^&sdcc330&'; \ stripecho /tmp/bin/`basename $ld` | sed 's&^&sdcc330&'; \ done install: sdcc330/tmp/bin/sdld: No such file or directory strip: can't open file: sdcc330/tmp/bin/sdld (No such file or directory) install: sdcc330/tmp/bin/sdldz80: No such file or directory strip: can't open file: sdcc330/tmp/bin/sdldz80 (No such file or directory) install: sdcc330/tmp/bin/sdldgb: No such file or directory strip: can't open file: sdcc330/tmp/bin/sdldgb (No such file or directory) install: sdcc330/tmp/bin/sdld6808: No such file or directory strip: can't open file: sdcc330/tmp/bin/sdld6808 (No such file or directory) make[1]: \*\*\* [install] Error 1 /usr/bin/install -c -d /tmp/bin /usr/bin/install -c ../../bin/sdcclibecho /tmp/bin/sdcclib|sed 's&^&sdcc330&'install: sdcc330/tmp/bin/sdcclib: No such file or directory make[1]: \*\*\* [install] Error 71 cp ./as2gbmap.py ../../bin/as2gbmap && chmod +x ../../bin/as2gbmap /usr/bin/install -c -d /tmp/bin /usr/bin/install -c ../../bin/as2gbmapecho /tmp/bin/as2gbmap|sed 's&^&sdcc330&'`
install: sdcc330/tmp/bin/as2gbmap: No such file or directory
make[1]: *** [install] Error 71
make: *** [install] Error 2

Tested on OSX with sdcc 3.3.0 and current cvs trunk head.

Discussion

  • Ben Shi
    Ben Shi
    2014-08-14

    This bug is both reproduced on my 32-bit ubuntu-12.04 and 64-bit MacOS-10.9.4. The --program-prefix is to the entire install path rather than the program name. Maybe the help information of configure is misguiding.

    Program names:
    --program-prefix=PREFIX prepend PREFIX to installed program names
    --program-suffix=SUFFIX append SUFFIX to installed program names
    --program-transform-name=PROGRAM run sed PROGRAM on installed program names