GNU bug report logs -
#49417
glibc uses "objcopy", but seems to need "TARGET-objcopy" [core-updates]
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49417 in the body.
You can then email your comments to 49417 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#49417
; Package
guix
.
(Mon, 05 Jul 2021 13:44:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Maxime Devos <maximedevos <at> telenet.be>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Mon, 05 Jul 2021 13:44:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
User: guix-devel <at> gnu.org
Usertags: powerpc64le-linux
Here is an extract from the build log
(<https://ci.guix.gnu.org/build/654298/log/raw>)
/gnu/store/ar373sjda7fz0m4mav6rdfmv49vv6r87-bash-minimal-5.1.8/bin/sh ../scripts/move-if-change /tmp/guix-build-glibc-cross-powerpc64le-linux-gnu-2.33.drv-0/build/gnu/lib-names-64-v2.T /tmp/guix-
build-glibc-cross-powerpc64le-linux-gnu-2.33.drv-0/build/gnu/lib-names-64-v2.h
objcopy --dump-section=.gnu.attributes=/tmp/guix-build-glibc-cross-powerpc64le-linux-gnu-2.33.drv-0/build/no_ldbl_gnu_attribute.bin.tmp /tmp/guix-build-glibc-cross-powerpc64le-linux-gnu-2.33.drv-
0/build/no_ldbl_gnu_attribute.o
touch /tmp/guix-build-glibc-cross-powerpc64le-linux-gnu-2.33.drv-0/build/libc-abis.stamp
touch /tmp/guix-build-glibc-cross-powerpc64le-linux-gnu-2.33.drv-0/build/dl-tunable-list.stmp
objcopy: Unable to recognise the format of the input file `/tmp/guix-build-glibc-cross-powerpc64le-linux-gnu-2.33.drv-0/build/no_ldbl_gnu_attribute.o'
make[2]: *** [../sysdeps/powerpc/powerpc64/le/Makefile:31: /tmp/guix-build-glibc-cross-powerpc64le-linux-gnu-2.33.drv-0/build/no_ldbl_gnu_attribute.bin] Error 1
make[2]: *** Waiting for unfinished jobs....
That looks like the earlier issue we had with "objdump" vs. "TARGET-objdump" ...
Maybe a similar fix is possible?
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#49417
; Package
guix
.
(Tue, 06 Jul 2021 14:50:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 49417 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Maxime Devos <maximedevos <at> telenet.be> skribis:
> That looks like the earlier issue we had with "objdump" vs. "TARGET-objdump" ...
> Maybe a similar fix is possible?
Yes, indeed. The attached patch does that and fixes the issue.
I’ll inline the patch in the ‘patches’ field and commit that later on so
as to group world rebuilds a bit. I’ll send it to libc-alpha too.
(Initially I tried patching just
sysdeps/powerpc/powerpc64/le/configure.ac but that’s not sufficient.)
Thanks,
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index ced226ef34..82af27e0b4 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -486,6 +486,11 @@ and the cross tool chain."
#:xbinutils xbinutils)
(package
(inherit libc)
+ (source (origin
+ (inherit (package-source glibc))
+ (patches (append (origin-patches (package-source glibc))
+ (list (search-patch
+ "glibc-powerpc64le-objcopy.patch"))))))
(name (string-append "glibc-cross-" target))
(arguments
(substitute-keyword-arguments
diff --git a/gnu/packages/patches/glibc-powerpc64le-objcopy.patch b/gnu/packages/patches/glibc-powerpc64le-objcopy.patch
new file mode 100644
index 0000000000..acdf29a02a
--- /dev/null
+++ b/gnu/packages/patches/glibc-powerpc64le-objcopy.patch
@@ -0,0 +1,156 @@
+Use "powerpc64le-linux-gnu-objcopy" rather than "objcopy" when cross-compiling
+to powerpc64le-linux-gnu: <https://issues.guix.gnu.org/49417>.
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 13a791ffde..5b370c07a2 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -118,8 +118,6 @@ AS=`$CC -print-prog-name=as`
+ LD=`$CC -print-prog-name=ld`
+ AR=`$CC -print-prog-name=ar`
+ AC_SUBST(AR)
+-OBJCOPY=`$CC -print-prog-name=objcopy`
+-AC_SUBST(OBJCOPY)
+ GPROF=`$CC -print-prog-name=gprof`
+ AC_SUBST(GPROF)
+
+diff --git a/configure b/configure
+index fe0eda1cd5..3a08270734 100755
+--- a/configure
++++ b/configure
+@@ -654,7 +654,6 @@ MAKE
+ LD
+ AS
+ GPROF
+-OBJCOPY
+ AR
+ LN_S
+ INSTALL_DATA
+@@ -689,6 +688,7 @@ sysheaders
+ ac_ct_CXX
+ CXXFLAGS
+ CXX
++OBJCOPY
+ OBJDUMP
+ READELF
+ CPP
+@@ -3054,6 +3054,98 @@ else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+ fi
+
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
++set dummy ${ac_tool_prefix}objcopy; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_OBJCOPY+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$OBJCOPY"; then
++ ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++OBJCOPY=$ac_cv_prog_OBJCOPY
++if test -n "$OBJCOPY"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
++$as_echo "$OBJCOPY" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_OBJCOPY"; then
++ ac_ct_OBJCOPY=$OBJCOPY
++ # Extract the first word of "objcopy", so it can be a program name with args.
++set dummy objcopy; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$ac_ct_OBJCOPY"; then
++ ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_OBJCOPY="objcopy"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
++if test -n "$ac_ct_OBJCOPY"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
++$as_echo "$ac_ct_OBJCOPY" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++ if test "x$ac_ct_OBJCOPY" = x; then
++ OBJCOPY="false"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ OBJCOPY=$ac_ct_OBJCOPY
++ fi
++else
++ OBJCOPY="$ac_cv_prog_OBJCOPY"
++fi
++
+
+ # We need the C++ compiler only for testing.
+ ac_ext=cpp
+@@ -4645,8 +4737,6 @@ AS=`$CC -print-prog-name=as`
+ LD=`$CC -print-prog-name=ld`
+ AR=`$CC -print-prog-name=ar`
+
+-OBJCOPY=`$CC -print-prog-name=objcopy`
+-
+ GPROF=`$CC -print-prog-name=gprof`
+
+
+diff --git a/configure.ac b/configure.ac
+index 924af12738..2148cd2ec8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,6 +53,7 @@ AC_SUBST(cross_compiling)
+ AC_PROG_CPP
+ AC_CHECK_TOOL(READELF, readelf, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
++AC_CHECK_TOOL(OBJCOPY, objcopy, false)
+
+ # We need the C++ compiler only for testing.
+ AC_PROG_CXX
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Wed, 07 Jul 2021 22:42:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Maxime Devos <maximedevos <at> telenet.be>
:
bug acknowledged by developer.
(Wed, 07 Jul 2021 22:42:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 49417-done <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> skribis:
> Maxime Devos <maximedevos <at> telenet.be> skribis:
>
>> That looks like the earlier issue we had with "objdump" vs. "TARGET-objdump" ...
>> Maybe a similar fix is possible?
>
> Yes, indeed. The attached patch does that and fixes the issue.
Pushed as 145a5a5797f0f673c817d99760d1c1e5d71aa11c.
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 05 Aug 2021 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.