Current-Users archive

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

Re: Building PCC for "tools" is broken (missing symbol __USE)- PCC bug or NetBSD source tree error?



First error of the night:

#   compile  libiberty/regex.o
/mnt/lfs/NetBSD-CVS/src/../tools/bin/i486--netbsdelf-pcc -O2 -std=gnu99 -Werror -Os -Wno-error=uninitialized -Wno-error=maybe-uninitialized --sysroot=/mnt/lfs/NetBSD-CVS/src/../destdir/i386-pb -DHAVE_CONFIG_H -I/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/lib/libiberty/arch/i386 -I/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/dist/include -c -Wno-stack-protector /mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/dist/libiberty/regex.c -o regex.o /mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/dist/include/xregex2.h, line 544: syntax error error: /mnt/lfs/NetBSD-CVS/src/../tools/libexec/i486--netbsdelf-ccom terminated with status 1

*** Failed target:  regex.o
*** Failed command: /mnt/lfs/NetBSD-CVS/src/../tools/bin/i486--netbsdelf-pcc -O2 -std=gnu99 -Werror -Os -Wno-error=uninitialized -Wno-error=maybe-uninitialized --sysroot=/mnt/lfs/NetBSD-CVS/src/../destdir/i386-pb -DHAVE_CONFIG_H -I/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/lib/libiberty/arch/i386 -I/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/dist/include -c -Wno-stack-protector /mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/dist/libiberty/regex.c -o regex.o
*** Error code 1

Stop.
nbmake[8]: stopped in /mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/lib/libiberty

*** Failed target:  dependall
*** Failed command: cd "/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/lib/libiberty"; /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake realall
*** Error code 1

Stop.
nbmake[7]: stopped in /mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/lib/libiberty

*** Failed target:  dependall-libiberty
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="lib/../external/gpl3/binutils/lib/"; real="/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/lib" ;; *) this="lib/../external/gpl3/binutils/lib/${dir}/"; real="/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/lib/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget libiberty dependall
*** Error code 1

Stop.
nbmake[6]: stopped in /mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/lib

*** Failed target:  dependall-../external/gpl3/binutils/lib
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="lib/"; real="/mnt/lfs/NetBSD-CVS/src/lib" ;; *) this="lib/${dir}/"; real="/mnt/lfs/NetBSD-CVS/src/lib/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget ../external/gpl3/binutils/lib dependall
*** Error code 1

Stop.
nbmake[5]: stopped in /mnt/lfs/NetBSD-CVS/src/lib

*** Failed target:  build_install
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="lib/"; real="/mnt/lfs/NetBSD-CVS/src/lib" ;; *) this="lib/${dir}/"; real="/mnt/lfs/NetBSD-CVS/src/lib/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . dependall-../crypto/external/bsd/netpgp/libmj dependall-../crypto/external/bsd/netpgp/lib/verify dependall-../external/bsd/elftoolchain/lib/libdwarf dependall-../external/mit/lua/lib dependall-libcurses dependall-libdm dependall-libedit dependall-libexecinfo dependall-libppath dependall-libperfuse dependall-libquota dependall-librefuse dependall-libisns dependall-librumpuser dependall-librumphijack dependall-libnpf dependall-../crypto/external/bsd/openssl/lib dependall-../external/bsd/file/lib dependall-../external/bsd/iscsi/lib dependall-../external/bsd/libarchive/lib dependall-../external/gpl2/lvm2/lib dependall-../external/gpl3/binutils/lib
*** Error code 1

Stop.
nbmake[4]: stopped in /mnt/lfs/NetBSD-CVS/src/lib

*** Failed target:  do-lib
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/mnt/lfs/NetBSD-CVS/src" ;; *) this="${dir}/"; real="/mnt/lfs/NetBSD-CVS/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget lib build_install
*** Error code 1

Stop.
nbmake[3]: stopped in /mnt/lfs/NetBSD-CVS/src

*** Failed target:  build
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/mnt/lfs/NetBSD-CVS/src" ;; *) this="${dir}/"; real="/mnt/lfs/NetBSD-CVS/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . do-lib
*** Error code 1

Stop.
nbmake[2]: stopped in /mnt/lfs/NetBSD-CVS/src

*** Failed target:  distribution
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/mnt/lfs/NetBSD-CVS/src" ;; *) this="${dir}/"; real="/mnt/lfs/NetBSD-CVS/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . build NOPOSTINSTALL=1
*** Error code 1

Stop.
nbmake[1]: stopped in /mnt/lfs/NetBSD-CVS/src

*** Failed target:  release
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/mnt/lfs/NetBSD-CVS/src" ;; *) this="${dir}/"; real="/mnt/lfs/NetBSD-CVS/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . distribution
*** Error code 1

Stop.
nbmake: stopped in /mnt/lfs/NetBSD-CVS/src

ERROR: Failed to make release
*** BUILD ABORTED ***
william@xubuntu-ltrain:~/Projects/NetBSD-CVS/util$
william@xubuntu-ltrain:~/Projects/NetBSD-CVS/util$ cat mk.conf.i386-pb
COPTS=-Os -Wno-error=uninitialized -Wno-error=maybe-uninitialized
#COPTS.libm=-O2
MKPCC=yes
MKGCC=no
HAVE_GCC=4 #Define if MKGCC=no
HAVE_PCC=1

The relevant lines which cause an error are here:
extern int regexec (const regex_t *__restrict __preg,
                   const char *__restrict __string, size_t __nmatch,
line 544:                    regmatch_t __pmatch[__restrict_arr],
                   int __eflags);

With that being said, I guess this is a gcc extension-related error, although I'm not sure how to fix it. Based upon lines 512 to 532, line 544 should be defined to "regmatch_t __pmatch[__restrict]". Perhaps pcc does not support that extension inside an array, but does elsewhere? If __restrict_arr expands to nothing, then we have regmatch_t __pmatch[], which seems to be legal ANSI C. Does the binutils version provided with NetBSD track upstream so perhaps I/someone could add a patch?


-----Original Message----- From: William D. Jones
Sent: Thursday, July 24, 2014 7:19 PM
To: Iain Hibbert
Cc: current-users%netbsd.org@localhost
Subject: Re: Building PCC for "tools" is broken (missing symbol __USE)- PCC bug or NetBSD source tree error?

Good going :D!

As of 5 minutes ago, by setting HAVE_GCC=4, HAVE_PCC=1, MKGCC=no, and
MKPCC=yes, I've successfully compiled the current pcc in the NetBSD source
tree (using i486--netbsdelf-gcc) into my (global for all archs) NetBSD tools
directory. pcc has also just successfully built a kernel for my i486
machine.

I recall reading that build.sh can automatically determine which sources pcc
can compile and which sources it cannot, so I'll let pcc attempt to build
the userland and will report back if it fails on any targets that I cannot
fix (or skip) myself.

At some point, I'll try a dummy i386 build target and see if pcc can compile
gcc by setting HAVE_PCC=1, HAVE_GCC=4, MKGCC=yes, and MKPCC=no. Failing
that- since pcc doesn't have a fully functional C++ backend, I'll download
GCC 4.7.3 and try the same with a pcc on my host machine (since that's
unrelated to NetBSD, I'll join/post on the pcc mailing list).

-----Original Message----- From: Iain Hibbert
Sent: Thursday, July 24, 2014 5:07 PM
To: William D. Jones
Cc: current-users%netbsd.org@localhost
Subject: Re: Building PCC for "tools" is broken (missing symbol __USE)- PCC
bug or NetBSD source tree error?

On Sun, 20 Jul 2014, Iain Hibbert wrote:

On Sat, 19 Jul 2014, William D. Jones wrote:

> > it certainly is. I think I remember that __USE() now, it was a local
> > (NetBSD) addition due to a set but unused variable, which is changed > > in
> > upstream versions now.
> Alright then. What do you suggest I do to reconcile the NetBSD version > with > the current upstream tree? Should I wait for the next major release of > PCC, > and then attempt to integrate the changes, or is there something I can > do now
> (to start)?

I will try to import a new version later this week..

I have imported pcc-20140706 now, please report any problems in the usual
places (here for NetBSD build problems, or the PCC issue tracker for
compilation troubles)

regards,
iain

--
William D. Jones
Rowan University | ECE | 2012
Member IEEE
Member Tau Beta Pi
thor0505%comcast.net@localhost
Message sent using 'Windows Live Mail' client.

Home | Main Index | Thread Index | Old Index