unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: problem with building gcc-cross-4.8.3 for i686-pc-gnu
@ 2015-01-31 10:27 Marek Benc
  2015-01-31 22:13 ` Marek Benc
  0 siblings, 1 reply; 10+ messages in thread
From: Marek Benc @ 2015-01-31 10:27 UTC (permalink / raw)
  To: manolis837; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

Could you try out the patch in this email?

Now, the problem is that GCC is configured with the native ld.so as the 
target system's dynamic linker.

I'm not sure what code is responsible for that, but on the wip-hurd 
branch, this exact same problem happens for other platforms as well.

In particular, it happened when I tried:
$ ./pre-inst-env guix build coreutils --target=i686-pc-linux-gnu -K
on an x86_64 box.

-- 
Marek.

[-- Attachment #2: set-cross-path-fix.patch --]
[-- Type: text/x-patch, Size: 2746 bytes --]

--- guix.old/gnu/packages/cross-base.scm	2015-01-31 11:06:42.025984113 +0100
+++ guix/gnu/packages/cross-base.scm	2015-01-31 10:37:35.290053633 +0100
@@ -151,21 +151,33 @@
                  `(alist-cons-before
                    'configure 'set-cross-path
                    (lambda* (#:key inputs #:allow-other-keys)
-                     ;; Add the cross Linux headers to CROSS_CPATH, and remove
+                     ;; Add the cross kernel headers to CROSS_CPATH, and remove
                      ;; them from CPATH.
                      (let ((libc  (assoc-ref inputs "libc"))
                            (linux (assoc-ref inputs
-                                             "libc/cross-linux-headers")))
+                                             "libc/cross-linux-headers"))
+                           (mach  (assoc-ref inputs
+                                             "libc/cross-gnumach-headers"))
+                           (hurd  (assoc-ref inputs
+                                             "libc/cross-hurd-headers"))
+                           (hurd-minimal (assoc-ref inputs
+                                             "libc/cross-hurd-minimal")))
                        (define (cross? x)
-                         ;; Return #t if X is a cross-libc or cross Linux.
+                         ;; Return #t if X is a cross-libc or a cross-kernel.
                          (or (string-prefix? libc x)
-                             (string-prefix? linux x)))
+                             (if linux        (string-prefix? linux x) #f)
+                             (if hurd         (string-prefix? hurd  x) #f)
+                             (if mach         (string-prefix? mach  x) #f)
+                             (if hurd-minimal (string-prefix? hurd-minimal x) #f)))
 
                        (setenv "CROSS_CPATH"
-                               (string-append libc "/include:"
-                                              linux "/include"))
+                               (string-append libc "/include"
+                                              (if linux (string-append ":" linux "/include") "")
+                                              (if hurd  (string-append ":" hurd "/include"
+                                                                       ":" mach "/include")  "")))
                        (setenv "CROSS_LIBRARY_PATH"
-                               (string-append libc "/lib"))
+                               (string-append libc "/lib"
+                                              (if hurd-minimal (string-append ":" hurd-minimal "/lib") "")))
 
                        (let ((cpath   (search-path-as-string->list
                                        (getenv "CPATH")))

^ permalink raw reply	[flat|nested] 10+ messages in thread
* problem with building gcc-cross-4.8.3 for i686-pc-gnu
@ 2014-12-30 14:28 Manolis Ragkousis
  2015-01-03 21:27 ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Manolis Ragkousis @ 2014-12-30 14:28 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

Hello guix, Hello Ludo

When trying to build coreutils for i686-pc-gnu, building
cross-gcc-4.8.3 with glibc-hurd fails with:

In unknown file:
   ?: 0 [string-append
"/gnu/store/1hl59s1pikplwfgclw4mlk38pkx3pc72-glibc-hurd-cross-i686-pc-gnu-2.18"
...]

ERROR: In procedure string-append:
ERROR: In procedure string-append: Wrong type (expecting string): #f

It shouldn't fail because glibc/hurd is in the path.

Checking the patch-source-shebangs phase, in the build log, shows that
the /bin/sh path is changed to use the native glibc, which I believe causes
the problem.

I am trying to understand and solve this, but I think I am
missing something from the building procedure of coreutils, so any
advice will be helpful. Why it doesn't use the glibc that it just cross-built?

I am attaching the build log and the env vars.

Thank you,
Manolis

[-- Attachment #2: 2macgcqsp2d760kyyxpfqx37kgi0ba-gcc-cross-i686-pc-gnu-4.8.3.drv.bz2 --]
[-- Type: application/x-bzip2, Size: 341717 bytes --]

[-- Attachment #3: environment-variables --]
[-- Type: application/octet-stream, Size: 4892 bytes --]

export CPATH="/gnu/store/3h38sfay2f02rk4i768ci8xabl706rf9-glibc-2.20/include:/gnu/store/rw5s9immq72plzajqm8g8i4sfg8z0kyc-linux-libre-headers-3.3.8/include:/gnu/store/1hl59s1pikplwfgclw4mlk38pkx3pc72-glibc-hurd-cross-i686-pc-gnu-2.18/include:/gnu/store/26wgqpd56vka6nvhq7qmb9wlm45n5dz7-hurd-minimal-cross-i686-pc-gnu-0.5/include:/gnu/store/57nflkf654zbc5wbsgkrvv3swqpnm4qz-hurd-headers-cross-i686-pc-gnu-0.5/include:/gnu/store/afz0x4z8vj4pimjkvjsbsy3dz3llsxkf-gnumach-headers-cross-i686-pc-gnu-1.4/include:/gnu/store/9ia5ps6x1ir1hml58vvjyh1l7ww46gnk-gmp-6.0.0a/include:/gnu/store/s0lg3f8wjdynln0086bqz7igsjmf5411-mpfr-3.1.2/include:/gnu/store/9ia5ps6x1ir1hml58vvjyh1l7ww46gnk-gmp-6.0.0a/include:/gnu/store/w87kcf7m1jh0jrl1kazbv7m2ldwybxq8-mpc-1.0.2/include:/gnu/store/s0lg3f8wjdynln0086bqz7igsjmf5411-mpfr-3.1.2/include:/gnu/store/9ia5ps6x1ir1hml58vvjyh1l7ww46gnk-gmp-6.0.0a/include:/gnu/store/9ia5ps6x1ir1hml58vvjyh1l7ww46gnk-gmp-6.0.0a/include:/gnu/store/ik0xxrzqgsz76gz3dbqcgfr5agl2khb9-isl-0.11.1/include:/gnu/store/c5cjz3qz09ayr6x742xhcf9zgyjymbv8-cloog-0.18.0/include:/gnu/store/2lg7wrqwvmmqh5vd8zvv1gwjfpbkgk38-libelf-0.8.13/include:/gnu/store/kmbdwpxvp4d5n7lm2j4829x7km8cyl1y-zlib-1.2.7/include:/gnu/store/nlns82dixqq4lkmpbvxg9crspihgrbf3-bzip2-1.0.6/include:/gnu/store/5s0minkxnzyazi4yra7p97g8dnfv4g16-xz-5.0.4/include:/gnu/store/9xdlrfvy2w3n24b7z22wd7dnjddxjndy-file-5.19/include:/gnu/store/2rmb78pg4nxc4dg4ffmm7qnar3j4am32-gawk-4.1.1/include:/gnu/store/qx2kk00lhmqsrickigdgi4kb733xgd2r-make-4.0/include:/gnu/store/45ki3bmjs5xchx071kq86542d5y2dfp2-binutils-2.24/include:/gnu/store/nmxfncmpj4ymdlr8d4k3lcdcc6mbwb6w-gcc-4.8.3/include"
export HOME="/homeless-shelter"
export LIBRARY_PATH="/gnu/store/3h38sfay2f02rk4i768ci8xabl706rf9-glibc-2.20/lib:/gnu/store/1hl59s1pikplwfgclw4mlk38pkx3pc72-glibc-hurd-cross-i686-pc-gnu-2.18/lib:/gnu/store/26wgqpd56vka6nvhq7qmb9wlm45n5dz7-hurd-minimal-cross-i686-pc-gnu-0.5/lib:/gnu/store/9ia5ps6x1ir1hml58vvjyh1l7ww46gnk-gmp-6.0.0a/lib:/gnu/store/s0lg3f8wjdynln0086bqz7igsjmf5411-mpfr-3.1.2/lib:/gnu/store/9ia5ps6x1ir1hml58vvjyh1l7ww46gnk-gmp-6.0.0a/lib:/gnu/store/w87kcf7m1jh0jrl1kazbv7m2ldwybxq8-mpc-1.0.2/lib:/gnu/store/s0lg3f8wjdynln0086bqz7igsjmf5411-mpfr-3.1.2/lib:/gnu/store/9ia5ps6x1ir1hml58vvjyh1l7ww46gnk-gmp-6.0.0a/lib:/gnu/store/9ia5ps6x1ir1hml58vvjyh1l7ww46gnk-gmp-6.0.0a/lib:/gnu/store/ik0xxrzqgsz76gz3dbqcgfr5agl2khb9-isl-0.11.1/lib:/gnu/store/c5cjz3qz09ayr6x742xhcf9zgyjymbv8-cloog-0.18.0/lib:/gnu/store/2lg7wrqwvmmqh5vd8zvv1gwjfpbkgk38-libelf-0.8.13/lib:/gnu/store/kmbdwpxvp4d5n7lm2j4829x7km8cyl1y-zlib-1.2.7/lib:/gnu/store/nlns82dixqq4lkmpbvxg9crspihgrbf3-bzip2-1.0.6/lib:/gnu/store/5s0minkxnzyazi4yra7p97g8dnfv4g16-xz-5.0.4/lib:/gnu/store/9xdlrfvy2w3n24b7z22wd7dnjddxjndy-file-5.19/lib:/gnu/store/2rmb78pg4nxc4dg4ffmm7qnar3j4am32-gawk-4.1.1/lib:/gnu/store/45ki3bmjs5xchx071kq86542d5y2dfp2-binutils-2.24/lib"
export NIX_BUILD_CORES="2"
export NIX_BUILD_TOP="/tmp/nix-build-gcc-cross-i686-pc-gnu-4.8.3.drv-0"
export NIX_STORE="/gnu/store"
export OLDPWD
export PATH="/gnu/store/bszwxw0d77f6mi3l8n5zn5v94306fziq-binutils-cross-i686-pc-gnu-2.24/bin:/gnu/store/3h38sfay2f02rk4i768ci8xabl706rf9-glibc-2.20/bin:/gnu/store/3h38sfay2f02rk4i768ci8xabl706rf9-glibc-2.20/sbin:/gnu/store/1hl59s1pikplwfgclw4mlk38pkx3pc72-glibc-hurd-cross-i686-pc-gnu-2.18/bin:/gnu/store/1hl59s1pikplwfgclw4mlk38pkx3pc72-glibc-hurd-cross-i686-pc-gnu-2.18/sbin:/gnu/store/c5cjz3qz09ayr6x742xhcf9zgyjymbv8-cloog-0.18.0/bin:/gnu/store/vzp9kx3qia35isi3isrmhr9klzd3wkp7-tar-1.28/bin:/gnu/store/q5dxwd523y0blylj3k2s5y4lr7llxc31-gzip-1.6/bin:/gnu/store/nlns82dixqq4lkmpbvxg9crspihgrbf3-bzip2-1.0.6/bin:/gnu/store/5s0minkxnzyazi4yra7p97g8dnfv4g16-xz-5.0.4/bin:/gnu/store/9xdlrfvy2w3n24b7z22wd7dnjddxjndy-file-5.19/bin:/gnu/store/l23x1c00415hpnnb8ilka3bv8xfv5qbn-diffutils-3.3/bin:/gnu/store/5b0sidpj18sys487b0n508rcjxmygwv2-patch-2.7.1/bin:/gnu/store/ai555s3wy50rsa74mlnw3jfbgj3fx9y1-sed-4.2.2/bin:/gnu/store/bna9rhyfz9ijl3hhgnmsywy4cld5fma9-findutils-4.4.2/bin:/gnu/store/2rmb78pg4nxc4dg4ffmm7qnar3j4am32-gawk-4.1.1/bin:/gnu/store/3hy722q3q4pd9mbk4jp2q3y1pb4mp4mv-grep-2.20/bin:/gnu/store/arvd1w0vywxdz8pir3cdagqg21lcrid0-coreutils-8.23/bin:/gnu/store/qx2kk00lhmqsrickigdgi4kb733xgd2r-make-4.0/bin:/gnu/store/3fd4cw58xy7k7sg6hj08b06vgk4qfhdv-bash-4.3.25/bin:/gnu/store/387mkhv1cnb6c4l54cky2l1ca9c9dxvi-ld-wrapper-0/bin:/gnu/store/45ki3bmjs5xchx071kq86542d5y2dfp2-binutils-2.24/bin:/gnu/store/nmxfncmpj4ymdlr8d4k3lcdcc6mbwb6w-gcc-4.8.3/bin"
export PWD="/tmp/nix-build-gcc-cross-i686-pc-gnu-4.8.3.drv-0/gcc-4.8.3"
export SHLVL="1"
export TEMP="/tmp/nix-build-gcc-cross-i686-pc-gnu-4.8.3.drv-0"
export TEMPDIR="/tmp/nix-build-gcc-cross-i686-pc-gnu-4.8.3.drv-0"
export TMP="/tmp/nix-build-gcc-cross-i686-pc-gnu-4.8.3.drv-0"
export TMPDIR="/tmp/nix-build-gcc-cross-i686-pc-gnu-4.8.3.drv-0"
export out="/gnu/store/a1a3z1avs14vm4xs8qsa4s8arlhbipx2-gcc-cross-i686-pc-gnu-4.8.3"

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-07 23:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-31 10:27 problem with building gcc-cross-4.8.3 for i686-pc-gnu Marek Benc
2015-01-31 22:13 ` Marek Benc
2015-02-01 18:56   ` Marek Benc
2015-02-05 12:44     ` Ludovic Courtès
     [not found]       ` <54D3A92A.6060209@gmx.com>
     [not found]         ` <87h9v014wk.fsf@gnu.org>
2015-02-05 20:32           ` Marek Benc
2015-02-07 23:24             ` Ludovic Courtès
2015-02-05 12:38   ` Ludovic Courtès
2015-02-05 16:22     ` [PATCH 0/4] gnu: Fix ld.so detection of cross-compilers for the GNU Hurd system Marek Benc
  -- strict thread matches above, loose matches on Subject: below --
2014-12-30 14:28 problem with building gcc-cross-4.8.3 for i686-pc-gnu Manolis Ragkousis
2015-01-03 21:27 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).