Menu

#3555 sdbinutils install doesn't respect prefix

pending-works-for-me
Felix
sdbinutils (1)
Build
5
2023-07-27
2023-02-18
No

sdbinutils installer doesn't respect prefix properly, and tries to install binaries in /usr/local/home/~

make[3]: Entering directory '/home/phillip/Z80/z88dk/src/sdcc-build/support/sdbinutils'
/bin/bash ./mkinstalldirs /usr/local/home/phillip/Z80/z88dk/src/sdcc-build/sdcc-install /usr/local/home/phillip/Z80/z88dk/src/sdcc-build/sdcc-install
mkdir -p -- /usr/local/home/phillip/Z80/z88dk/src/sdcc-build/sdcc-install /usr/local/home/phillip/Z80/z88dk/src/sdcc-build/sdcc-install
mkdir: cannot create directory ‘/usr/local/home’: Permission denied
mkdir: cannot create directory ‘/usr/local/home’: Permission denied

Related

Wiki: SDCC 4.3.0 Release
Wiki: SDCC 4.4.0 Release
Wiki: SDCC 4.5.0 Release

Discussion

  • Phillip Stevens

    Phillip Stevens - 2023-02-18

    This may be linked to #3491 where the --disable-sdbinutils option is provided and yet sdbinutils is built anyway.

    For further information, the prefix is provided in the configure line...

    --disable-sdbinutil --prefix=`pwd`/sdcc-install
    
     

    Last edit: Phillip Stevens 2023-02-18
  • Felix

    Felix - 2023-03-27

    sdbinutils is no longer built if --disable-sdbinutils has been specified, see [r13894].
    Unfortunately, now the build does not complete because sdcpp requires sdbinutils.
    I can't see a connection to the prefix issue reported here.

    Anyhow, I configured with just --prefix=pwd/sdcc-install.
    Then, make -C support/sdbinutils seems to run through. I get
    ~~~
    $ grep sdbinutils/configure support/sdbinutils/config.log
    $ ../../../support/sdbinutils/configure --disable-option-checking --prefix=[somewhere]prefixtest/sdcc-install [..]
    ~~~

    In particular, the prefix is passed on.

    The command 'make -C support/sdbinutils install' does not produce an error message. It seems to do what it is supposed to do, I get 4 binary executables in sdcc-install/bin.

    (/usr/local/home does not exist here.)

     

    Related

    Commit: [r13894]

  • Phillip Stevens

    Phillip Stevens - 2023-03-28

    When a 4.3.0 RC is available we'll retest and see if we can close that issue.

     
  • Atirut Wattanamongkol

    I encountered this issue when building Z88DK with SDCC enabled. Repro-ed on an Ubuntu VM

    ...
    make[2]: Entering directory '/home/atirut/z88dk/src/sdcc-build/sdas/asz80'
    
    install -d /usr/local/home/atirut/z88dk/src/sdcc-build/sdcc-install/bin
    
    install: cannot create directory ‘/usr/local/home’: Permission denied
    
    make[2]: *** [Makefile:98: installdirs] Error 1
    
    make[2]: Leaving directory '/home/atirut/z88dk/src/sdcc-build/sdas/asz80'
    
    make[2]: Entering directory '/home/atirut/z88dk/src/sdcc-build/sdas/asrab'
    
    install -d /usr/local/home/atirut/z88dk/src/sdcc-build/sdcc-install/bin
    
    install: cannot create directory ‘/usr/local/home’: Permission denied
    
    make[2]: *** [Makefile:98: installdirs] Error 1
    
    make[2]: Leaving directory '/home/atirut/z88dk/src/sdcc-build/sdas/asrab'
    
    make[2]: Entering directory '/home/atirut/z88dk/src/sdcc-build/sdas/asgb'
    
    install -d /usr/local/home/atirut/z88dk/src/sdcc-build/sdcc-install/bin
    
    install: cannot create directory ‘/usr/local/home’: Permission denied
    
    make[2]: *** [Makefile:98: installdirs] Error 1
    
    make[2]: Leaving directory '/home/atirut/z88dk/src/sdcc-build/sdas/asgb'
    
    make[2]: Entering directory '/home/atirut/z88dk/src/sdcc-build/sdas/linksrc'
    ...
    
     

    Last edit: Atirut Wattanamongkol 2023-07-25
  • Phillip Stevens

    Phillip Stevens - 2023-07-27

    We're just grabbing the true binary in src directory following make all, and no longer doing make install, so this can be closed. It is not fixed, but it is no longer relevant.

    https://github.com/z88dk/z88dk/pull/2370

     

    Last edit: Phillip Stevens 2023-07-27
  • Felix

    Felix - 2023-07-27
    • status: open --> pending-works-for-me
    • assigned_to: Felix
     

Log in to post a comment.