Issue 8416 - Cross compiling failed
Summary: Cross compiling failed
Status: VERIFIED DUPLICATE of issue 9327
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.44
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-03 07:37 UTC by vystrcil.martin@gmail.com
Modified: 2020-09-22 00:35 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description vystrcil.martin@gmail.com 2016-05-03 07:37:53 UTC
Full_Name: Martin Vystrcil
Version: 2.4.4
OS: Linux Mint
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (147.32.219.136)


While cross compiling it is not able to strip final binaries.
My config command:
./configure --host=arm-linux-gnueabihf
CC=/home/martin/Development/SMON3/testing/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-gcc
STRIP=/home/martin/Development/SMON3/testing/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-strip
--with-yielding_select=yes --prefix=/home/martin/Development/SMON3/testing/ldap

What it prints (fail with)

make[2]: Entering director%6`/home/martin/Development/SMON3/testing/openldap-2.4.44/clients/tools'
../../build/shtool mkdir -p /home/martin/Development/SMON3/testing/ldap/bin
../../build/shtool install -c -m 755 -s ldapsearch
/home/martin/Development/SMON3/testing/ldap/bin/ldapsearch
strip: Unable to recognise the format of the input file
`/home/martin/Development/SMON3/testing/ldap/bin/#INST@30215#'

Why this happen ?
In file build/shtool is following construction.
        if [ ".$opt_s" = .yes ]; then
            if [ ".$opt_t" = .yes ]; then
                echo "strip $dsttmp" 1>&2
            fi
            strip $dsttmp || shtool_exit $?
        fi

In my opinion there should be strip based on config. In config there it is set
correctly.

Please lememe know, h t to fix this correctly, I'm not such an expert for
automake.
Comment 1 Ryan Tandy 2020-04-18 20:21:16 UTC
Still occurs, but the bug is in GNU shtool, not OpenLDAP.

Note that for OpenLDAP the STRIP variable contains the -s flag that makes install(1) strip binaries. Not a path to a program.

GNU install(1) has a --strip-program=PROGRAM flag that might help with this. shtool strip doesn't seem to have any options about the strip program.
Comment 3 Ryan Tandy 2020-04-18 20:33:14 UTC
A better (but still hacky) workaround for GNU systems would be:

make INSTALL=install STRIP='-s --strip-program=arm-linux-gnueabihf-strip' install
Comment 4 Quanah Gibson-Mount 2020-09-22 00:35:36 UTC

*** This issue has been marked as a duplicate of issue 9327 ***