pkgsrc-Bugs archive

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

Re: pkg/57647: lang/clang 6.0.6 update not usable for building other packages



The following reply was made to PR pkg/57647; it has been noted by GNATS.

From: "David H. Gutteridge" <david%gutteridge.ca@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/57647: lang/clang 6.0.6 update not usable for building
 other packages
Date: Wed, 18 Oct 2023 23:43:39 -0400

 On Tue, 17 Oct 2023 at 19:13:35 -0700, David Shao wrote:
 >I am aware and have applied the fix for one package
 >lang/wasi-compiler-rt. That enables
 >that package to build.
 >
 >But let us think about the logic of this situation.  llvm and clang
 >were updated from 15 to 16.
 >How is the foundational cause the fault of that one package?
 
 wasi-compiler-rt is a component directly associated with LLVM; it's
 part of the whole update to 16.0.6 that happened. So they are
 foundationally related.
 
 I had originally assumed the point of your PR was that you were trying
 to build one of the Firefox packages that depend on wasi-compiler-rt,
 and were blocked by this. (Firefox itself of course presently requires
 both GCC and clang to build.)
 
 >Here is another demonstration.  For x11/xfce4-terminal, try switching
 >the compiler to clang
 >from NetBSD amd64 current, X11_TYPE native.
 >
 >PKGSRC_COMPILER=3Dclang
 >
 >.include "../../lang/clang/buildlink3.mk"
 >
 >and whatever else in Makefile.  It seems to build fine.  Except if one
 >looks at the config.log:
 >
 >Target: x86_64-unknown-netbsd10.99
 >Thread model: posix
 >InstalledDir: /usr/pkg/bin
 >configure:4060: $? =3D 0
 >configure:4049: gcc -v >&5
 >clang version 16.0.6
 >Target: x86_64-unknown-netbsd10.99
 >Thread model: posix
 >InstalledDir: /usr/pkg/bin
 > "/usr/bin/ld" --eh-frame-hdr -pie -dynamic-linker /libexec/ld.elf_so
 >-o a.out /usr/lib/crt0.o /usr/lib/crti.o /usr/lib/crtbeginS.o -zrelro
 >-lc /usr/lib/crtendS.o /usr/lib/crtn.o
 >/usr/bin/ld: /usr/lib/crt0.o: in function `___start':
 >(.text+0x2d9): undefined reference to `main'
 >clang-16: error: linker command failed with exit code 1 (use -v to see
 >invocation)
 >configure:4060: $? =3D 1
 >configure:4049: gcc -V >&5
 >clang-16: error: unsupported option '-V -Qunused-arguments'
 >configure:4060: $? =3D 1
 >configure:4049: gcc -qversion >&5
 >clang-16: error: unknown argument '-qversion'; did you mean '--version'?
 >configure:4060: $? =3D 1
 >configure:4049: gcc -version >&5
 >clang-16: error: unknown argument '-version'; did you mean '--version'?
 >configure:4060: $? =3D 1
 >configure:4080: checking whether the C compiler works
 >configure:4102: gcc -O2 -I/usr/pkg/include -I/usr/pkg/include/glib-2.0
 >-I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include
 >-I/usr/include -I/usr/X11R7/include -I/usr/pkg/include/freetype2
 >-I/usr/pkg/include/harfbuzz -I/usr/X11R7/include/libdrm
 >-I/usr/pkg/include -I/usr/pkg/include/glib-2.0
 >-I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include
 >-I/usr/include -I/usr/X11R7/include -I/usr/pkg/include/freetype2
 >-I/usr/pkg/include/harfbuzz -I/usr/X11R7/include/libdrm -Wl,-zrelro
 >-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib
 >-L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib conftest.c  >&5
 >
 >If I am reading this correctly, configure finds that clang 16 doesn't
 >work and switches to NetBSD's current base gcc, which is
 >good enough since it is gcc 10.
 >
 >I have doubts that clang-16 is functioning close to what it should do.
 
 Yes, though that is an entirely different issue. I just tested your
 example with clang-15, and it fails identically. Nothing to do with the
 recent update, it simply doesn't work here (at least, as invoked).
 Trying to use clang in general by default is probably not something
 that's been tested much, if at all, AFAIK.
 
 Regards,
 
 Dave
 


Home | Main Index | Thread Index | Old Index