On Fri, 2018-06-08 at 22:16 +0200, Christopher Gregory wrote:
> > Sent: Saturday, June 09, 2018 at 5:00 AM
> > From: "Ken Moffat" <[email protected]>
> > To: "BLFS Support List" <[email protected]>
> > Subject: Re: [blfs-support] Cups-2.2.7 with clang 6 installed
> > 
> > On Thu, Jun 07, 2018 at 09:56:05AM -0500, Bruce Dubbs wrote:
> > > On 06/07/2018 05:04 AM, Wayne Blaszczyk wrote:
> > > 
> > > > I build llvm and clang separately and use slightly different parameters 
> > > > to the book, hence why I didn't report this issue myself.
> > > > But looking at the configure script, (and I'm not expert reading these 
> > > > scripts), but to me it looks like if it finds clang++, it will use it 
> > > > rather than g++.
> > > > I would be interested in your configure output around this area:
> > > > 
> > > > checking for gcc option to accept ISO C89... none needed
> > > > checking how to run the C preprocessor... gcc -E
> > > > checking for clang++... clang++
> > > > checking whether we are using the GNU C++ compiler... yes
> > > > checking whether clang++ accepts -g... yes
> > > > checking for ranlib... ranlib
> > > > checking for ar... /usr/bin/ar
> > > > checking for chmod... /bin/chmod
> > > 
> > > Yes, I have the identical sequence on my log.
> > > 
> > 
> > As a long-time radeon user, what is in the book works for me too.
> > 
> > My LLVM uses
> > CC=gcc CXX=g++ \
> > cmake -DCMAKE_INSTALL_PREFIX=/usr           \
> >       -DLLVM_ENABLE_FFI=ON                  \
> >       -DCMAKE_BUILD_TYPE=Release            \
> >       -DLLVM_BUILD_LLVM_DYLIB=ON            \
> >       -DLLVM_LINK_LLVM_DYLIB=ON             \
> >       -DLLVM_TARGETS_TO_BUILD="host;AMDGPU" \
> >       -Wno-dev ..
> > 
> > and I do not build cups until after Xorg (but before the gtk
> > toolkits).
> > 
> > With systemd disabled and just passing CC=gcc to configure, the
> > output from cups at the start of make is:
> > 
> > config.status: creating config.h
> > Using ARCHFLAGS=
> > Using ALL_CFLAGS=-I.. -D_CUPS_SOURCE -O2 -march=native 
> > -I/usr/include/libusb-1.0 -I/usr/include/dbus-1.0 
> > -I/usr/lib/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE 
> > -I/usr/include/p11-kit-1
> > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT  
> > Using ALL_CXXFLAGS=-I.. -D_CUPS_SOURCE -O2 -march=native 
> > -I/usr/include/p11-kit-1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
> > -D_THREAD_SAFE -D_REENTRANT  
> > Using CC=gcc
> > Using CXX=gcc
> > Using DSOFLAGS=-L../cups  -Wl,-soname,all -shared -Wall -Wno-format-y2k 
> > -Wunused -fPIC -Os -g -fstack-protector -Wno-unused-result 
> > -Wsign-conversion -Wno-tautological-compare -Wno-format-
> > truncation -D_GNU_SOURCE
> > Using LDFLAGS=-L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler 
> > -fPIE -pie -Wall -Wno-format-y2k -Wunused -fPIC -Os -g -fstack-protector 
> > -Wno-unused-result -Wsign-conversion -Wno-
> > tautological-compare -Wno-format-truncation -D_GNU_SOURCE
> > Using LIBS=-lcups   -lgnutls -lz -lpthread -lm -lcrypt   -lz
> > Making all in cups...
> > 
> > Curious why it doesn't work for you.
> > 
> > ĸen
> > -- 
> >               Keyboard not found, Press F1 to continue
> > -- 
> > http://lists.linuxfromscratch.org/listinfo/blfs-support
> > FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> > Unsubscribe: See the above information page
> > 
> 
> Hello Ken,
> 
> Your not the only one who is curious by this.  It makes no sense that giving 
> the exact same tar ball, and using the exact same method of building that two 
> people get exactly the same error.
> 
> Wayne,  what version of the book are you using?  ie is it systemd or sysv?  I 
> am just wondering if having systemd installed is some how or other messing 
> things up.  I have had to use this CC=gcc
> CXX=g++ on quite a few packages this time round.
> 
> Regards,
> 
> Christopher.

I used systemd.

My LLVM build uses the following:

CC=gcc CXX=g++ \
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_ENABLE_FFI=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_TARGETS_TO_BUILD="host" \
-Wno-dev \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-Bsymbolic" \
..

My clang build uses the following:

CC=gcc CXX=g++ \
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_CONFIG=/usr/bin/llvm-config \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_LINK_LLVM_DYLIB=ON \
-Wno-dev \
..

I do not build the Compiler RT.

The reason why I made these changes at the time was,
1) I like to separate out builds into there individual packages.
2) I wanted to get rid of the LDFLAGS=-lLLVM from the mesa build due to llvm 
being linked to every binary even if it was not needed.

Going back to the cups build, I added few echo commands into configure:

 3480   if test -n "$CCC"; then
 3481     CXX=$CCC
 3482     echo FRED3: $CXX
 3483   else
 3484     if test -n "$ac_tool_prefix"; then
...
 3570 
 3571   if test "x$ac_ct_CXX" = x; then
 3572     CXX="g++"
 3573     echo FRED1: $CXX
 3574   else
 3575     case $cross_compiling:$ac_tool_warned in
 3576 yes:)
 3577 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not 
prefixed with host tr      iplet" >&5
 3578 $as_echo "$as_me: WARNING: using cross tools not prefixed with host 
triplet" >&2;}
 3579 ac_tool_warned=yes ;;
 3580 esac
 3581     CXX=$ac_ct_CXX
 3582     echo FRED2: $CXX
 3583   fi
 3584 fi
 3585 
...
11703 chmod +x cups-config
11704 echo FRED4: $CXX


Running 
wblaszcz [ /sources/cups-2.2.7 ]$ ./configure |grep FRED
FRED2: clang++
FRED4: clang++
wblaszcz [ /sources/cups-2.2.7 ]$ CC=gcc ./configure |grep FRED
FRED2: clang++
FRED4: clang++
wblaszcz [ /sources/cups-2.2.7 ]$ CC=gcc CXX=g++ ./configure |grep FRED
FRED4: g++
wblaszcz [ /sources/cups-2.2.7 ]$ 

Regards,
Wayne.

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to