Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Failing to crosscompile on Linux



On Mon, 16 Apr 2018 13:53:00 +0200
Kamil Rytarowski <n54%gmx.com@localhost> wrote:

> On 16.04.2018 12:07, Mandacarú Cascavel wrote:
> > On Sun, 15 Apr 2018 15:31:57 +0200
> > Kamil Rytarowski <n54%gmx.com@localhost> wrote:
> > 
> >> On 28.03.2018 11:08, Mandacarú Cascavel wrote:
> >>> Hi, Friends.
> >>>
> >>> NetBSD-current (-m amd64) stops the crosscompilling process on a Debian amd64 unstable box in the following place:
> >>>
> >>> cc  -O   -o make  ar.o arscan.o  commands.o default.o dir.o  expand.o file.o function.o  getopt.o getopt1.o implicit.o  job.o main.o misc.o  read.o remake.o remote-stub.o  rule.o signame.o strcache.o  variable.o version.o vpath.o  hash.o glob/libglob.a     
> >>> glob/libglob.a(glob.o): In function `glob_in_dir':
> >>> glob.c:(.text+0x2c0): undefined reference to `__alloca'
> >>> glob.c:(.text+0x3b4): undefined reference to `__alloca'
> >>> glob.c:(.text+0x4a0): undefined reference to `__alloca'
> >>> glob.c:(.text+0x5a3): undefined reference to `__alloca'
> >>> glob/libglob.a(glob.o): In function `glob':
> >>> glob.c:(.text+0xadb): undefined reference to `__alloca'
> >>> glob/libglob.a(glob.o):glob.c:(.text+0xbe6): more undefined references to `__alloca' follow
> >>> collect2: error: ld returned 1 exit status
> >>>
> >>> *** Failed target:  make
> >>> *** Failed command: cc -O -o make ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o implicit.o job.o main.o misc.o read.o remake.o remote-stub.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o glob/libglob.a 
> >>> *** Error code 1
> >>>
> >>> Stop.
> >>> nbmake[10]: stopped in /home/usuario/netbsd/obj/tools/gmake/build
> >>>
> >>> This is repeatedly happening from some days ago.
> >>>
> >>
> >> Can you test this?
> >>
> >> Index: glob.c
> >> ===================================================================
> >> RCS file: /cvsroot/src/external/gpl2/gmake/dist/glob/glob.c,v
> >> retrieving revision 1.1.1.1
> >> diff -u -r1.1.1.1 glob.c
> >> --- glob.c	18 Aug 2014 06:47:54 -0000	1.1.1.1
> >> +++ glob.c	15 Apr 2018 13:28:45 -0000
> >> @@ -207,7 +207,7 @@
> >>  #endif /* __GNU_LIBRARY__ */
> >>
> >>
> >> -#if !defined __alloca && !defined __GNU_LIBRARY__
> >> +#if !defined __alloca && defined __GNU_LIBRARY__
> >>
> >>  # ifdef	__GNUC__
> >>  #  undef alloca
> >>
> >>
> >>
> >> Reference:
> >>
> >> https://lists.nongnu.org/archive/html/bug-make/2017-11/msg00020.html
> >>
> > Sorry, but I'm a simple NetBSD end user. Should I do anything more to insert your patch in glob.c?
> > 
> 
> Please apply the patch and retry.
> 

Patch applied to glob.c. (#patch glob.c r1.1.1.1). NetBSD is compiling in my 'Debian sid' again. Everything works fine now.

-------------
#   install  /home/usuario/netbsd/src/../tools/bin/nbconfig
mkdir -p /home/usuario/netbsd/src/../tools/bin
/home/usuario/netbsd/src/../tools/bin/x86_64--netbsd-install -c -p -r -m 555 config /home/usuario/netbsd/src/../tools/bin/nbconfig
===> Tools built to /home/usuario/netbsd/src/../tools
===> build.sh ended:      Mon Apr 16 10:48:28 -03 2018
===> Summary of results:
	 build.sh command:    ./build.sh -m amd64 -T ../tools -O ../obj -D ../dist -x -X ../xsrc -R ../rel -U -u tools
	 build.sh started:    Mon Apr 16 10:32:04 -03 2018
	 NetBSD version:      8.99.14
	 MACHINE:             amd64
	 MACHINE_ARCH:        x86_64
	 Build platform:      Linux 4.15.0-2-amd64 x86_64
	 HOST_SH:             /bin/sh
	 MAKECONF file:       /etc/mk.conf (File not found)
	 TOOLDIR path:        /home/usuario/netbsd/src/../tools
	 DESTDIR path:        /home/usuario/netbsd/src/../dist
	 RELEASEDIR path:     /home/usuario/netbsd/src/../rel
	 Updated makewrapper: /home/usuario/netbsd/src/../tools/bin/nbmake-amd64
	 Tools built to /home/usuario/netbsd/src/../tools
	 build.sh ended:      Mon Apr 16 10:48:28 -03 2018
===> .

-------------

Thanks, Kamil.

Mandacarú
-- 
Mandacarú Cascavel <mancasc%yahoo.com.br@localhost>


Home | Main Index | Thread Index | Old Index