Subject: non-native X on recent Solaris builds
To: None <tech-pkg@netbsd.org>
From: None <maciejej@msoe.edu>
List: tech-pkg
Date: 06/24/2005 02:41:43
I want to use pkgsrc (2005Q1, I think) on top of SchilliX, the new
OpenSolaris distro. Since there's no X included yet, I'm trying to build X
from pkgsrc. So far I've tried all combinations of GCC, SunPro, Xorg, and
XFree86. I'd prefer to use GCC and Xorg, so I'm asking for help with that
first.

The problem is that xorg-imake is looking for the the SunPro compiler even
if I tell it to use GCC (PKGSRC_COMPILER=gcc, CC=gcc, etc.).
Interestingly, if it finds /opt/SUNWspro/bin, it tries to use that as the
compiler, even though that path is actually a directory. Otherwise it
tries to use GCC as SunPro and GCC chokes on the SunPro options.

If you need more information or want me to try other configurations, I'd
be happy to help. I'm hoping this will be an easy fix for someone more
familiar with pkgsrc.

Here's the relevant output from both previously described attempts:



# uname -a
SunOS unknown 5.11 snv_16 i86pc i386 i86pc
# gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-multilib --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
# /opt/SUNWspro/bin/cc -V
cc: Sun C 5.7 2005/01/07
usage: cc [ options] files.  Use 'cc -flags' for details
# cd /export/home/pkgsrc/meta-pkgs/xorg ; bmake install
...
===> Returning to build of xorg-imake-6.8.2nb1
===> Patching for xorg-imake-6.8.2nb1
===> Applying pkgsrc patches for xorg-imake-6.8.2nb1
===> Overriding tools for xorg-imake-6.8.2nb1
===> Creating toolchain wrappers for xorg-imake-6.8.2nb1
===> Configuring for xorg-imake-6.8.2nb1
===> Building for xorg-imake-6.8.2nb1
cd /export/home/pkgsrc/x11/xorg-imake/work/xc && /usr/pkg/bin/bmake
Makefile.boot &&     /usr/pkg/bin/bmake -f xmakefile VerifyOS version.def
Makefiles includescd ./config/imake && /usr/pkg/bin/bmake   -f
Makefile.ini BOOTSTRAPCFLAGS="" CC="gcc"
making imake with BOOTSTRAPCFLAGS= and
CROSSCOMPILEFLAGS=-DCROSSCOMPILEDIR="" in config/imake
gcc -o ccimake -DCROSSCOMPILEDIR=\"\"  -O -I../../include
-I../../imports/x11/include/X11 ccimake.c
if [ -n "" ] ; then  /cc -E `./ccimake`  -DCROSSCOMPILE_CPP imakemdep.h >
imakemdep_cpp.h;  else touch imakemdep_cpp.h; fi
gcc -c  -O -I../../include -I../../imports/x11/include/X11 `./ccimake`
imake.c
gcc -o imake  -O -I../../include -I../../imports/x11/include/X11 imake.o
rm -f ./config/makedepend/Makefile.proto
./config/imake/imake -I./config/cf  -s ./config/makedepend/Makefile.proto
-f ./config/makedepend/Imakefile -DTOPDIR=../..
-DCURDIR=./config/makedepend
warning: could not parse version number in output of:
         cc  -V 2>&1
warning: could not parse version number in output of:
         CC  -V 2>&1
cd ./config/makedepend && rm -f -r Makefile Makefile.dep makedepend *.o
bootstrap
cd ./config/makedepend && /usr/pkg/bin/bmake -f Makefile.proto bootstrap
./config/imake/imake -I./config/cf  -s ./config/imake/Makefile.proto -f
./config/imake/Imakefile -DTOPDIR=../.. -DCURDIR=./config/imake
-DBootStrap
warning: could not parse version number in output of:
         cc  -V 2>&1
warning: could not parse version number in output of:
         CC  -V 2>&1
cd ./config/imake && /usr/pkg/bin/bmake -f Makefile.proto bootstrapdepend
cd ./config/imake && /usr/pkg/bin/bmake   -f Makefile.ini
BOOTSTRAPCFLAGS="" CC="gcc" bootstrap
+ mkdir bootstrap
mv *.o bootstrap
+ mv imake bootstrap
cd ./config/imake && /usr/pkg/bin/bmake -f Makefile.proto imakeonly
/opt/SUNWspro/bin -xO4 -xstrconst -xpentium -Xa -v -zlazyload -zcombreloc
-xstrconst -xildoff   -I../../include -I../../exports/include/X11  -I../..
-I../../exports/include   -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386   
  -DSVR4 -DCPP_PROGRAM="\"/usr/ccs/lib/cpp\"" -DHAS_MERGE_CONSTANTS=`if
/opt/SUNWspro/bin -fmerge-constants -xc /dev/null -S -o /dev/null 2>
/dev/null 1> /dev/null; then echo 1; else echo 0; fi`          -c imake.c
/bin/sh: /opt/SUNWspro/bin: cannot execute
*** Error code 1

Stop.
bmake: stopped in /export/home/pkgsrc/x11/xorg-imake/work/xc/config/imake
*** Error code 1

Stop.
bmake: stopped in /export/home/pkgsrc/x11/xorg-imake/work/xc
*** Error code 1

Stop.
bmake: stopped in /export/home/pkgsrc/x11/xorg-imake
===>
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /export/home/pkgsrc/x11/xorg-imake/work/.work.log
===>
*** Error code 1

Stop.
bmake: stopped in /export/home/pkgsrc/x11/xorg-imake
*** Error code 1

Stop.
bmake: stopped in /export/home/pkgsrc/x11/xorg-imake
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/meta-pkgs/xorg
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/meta-pkgs/xorg



# mv /opt/SUNWspro/bin/ /opt/SUNWspro/_bin
# cd /export/home/pkgsrc/x11/xorg-imake
# bmake clean && bmake install
===> Cleaning for xorg-imake-6.8.2nb1
===> *** No /export/home/pkgsrc/distfiles/pkg-vulnerabilities file found,
===> *** skipping vulnerability checks. To fix, install
===> *** the pkgsrc/security/audit-packages package and run
===> *** '/usr/pkg/sbin/download-vulnerability-list'.
=> Checksum SHA1 OK for X11R6.8.2-src1.tar.gz.
=> Checksum RMD160 OK for X11R6.8.2-src1.tar.gz.
=> Checksum SHA1 OK for X11R6.8.2-src3.tar.gz.
=> Checksum RMD160 OK for X11R6.8.2-src3.tar.gz.
===> Extracting for xorg-imake-6.8.2nb1
===> Required installed package xorg-dirs>=1.1: xorg-dirs-1.1 found
===> Required installed package patch>=2.2: patch-2.5.4nb2 found
===> Patching for xorg-imake-6.8.2nb1
===> Applying pkgsrc patches for xorg-imake-6.8.2nb1
===> Overriding tools for xorg-imake-6.8.2nb1
===> Creating toolchain wrappers for xorg-imake-6.8.2nb1
===> Configuring for xorg-imake-6.8.2nb1
===> Building for xorg-imake-6.8.2nb1
cd /export/home/pkgsrc/x11/xorg-imake/work/xc && /usr/pkg/bin/bmake
Makefile.boot &&     /usr/pkg/bin/bmake -f xmakefile VerifyOS version.def
Makefiles includescd ./config/imake && /usr/pkg/bin/bmake   -f
Makefile.ini BOOTSTRAPCFLAGS="" CC="gcc"
making imake with BOOTSTRAPCFLAGS= and
CROSSCOMPILEFLAGS=-DCROSSCOMPILEDIR="" in config/imake
gcc -o ccimake -DCROSSCOMPILEDIR=\"\"  -O -I../../include
-I../../imports/x11/include/X11 ccimake.c
if [ -n "" ] ; then  /cc -E `./ccimake`  -DCROSSCOMPILE_CPP imakemdep.h >
imakemdep_cpp.h;  else touch imakemdep_cpp.h; fi
gcc -c  -O -I../../include -I../../imports/x11/include/X11 `./ccimake`
imake.c
gcc -o imake  -O -I../../include -I../../imports/x11/include/X11 imake.o
rm -f ./config/makedepend/Makefile.proto
./config/imake/imake -I./config/cf  -s ./config/makedepend/Makefile.proto
-f ./config/makedepend/Imakefile -DTOPDIR=../..
-DCURDIR=./config/makedepend
warning: could not parse version number in output of:
         cc  -V 2>&1
warning: could not parse version number in output of:
         /opt/SUNWspro/bin/cc  -V 2>&1
warning: could not parse version number in output of:
         CC  -V 2>&1
warning: could not parse version number in output of:
         /opt/SUNWspro/bin/CC  -V 2>&1
cd ./config/makedepend && rm -f -r Makefile Makefile.dep makedepend *.o
bootstrap
cd ./config/makedepend && /usr/pkg/bin/bmake -f Makefile.proto bootstrap
./config/imake/imake -I./config/cf  -s ./config/imake/Makefile.proto -f
./config/imake/Imakefile -DTOPDIR=../.. -DCURDIR=./config/imake
-DBootStrap
warning: could not parse version number in output of:
         cc  -V 2>&1
warning: could not parse version number in output of:
         /opt/SUNWspro/bin/cc  -V 2>&1
warning: could not parse version number in output of:
         CC  -V 2>&1
warning: could not parse version number in output of:
         /opt/SUNWspro/bin/CC  -V 2>&1
cd ./config/imake && /usr/pkg/bin/bmake -f Makefile.proto bootstrapdepend
cd ./config/imake && /usr/pkg/bin/bmake   -f Makefile.ini
BOOTSTRAPCFLAGS="" CC="gcc" bootstrap
+ mkdir bootstrap
mv *.o bootstrap
+ mv imake bootstrap
cd ./config/imake && /usr/pkg/bin/bmake -f Makefile.proto imakeonly
cc -xO4 -xstrconst -xpentium -Xa -v -zlazyload -zcombreloc -xstrconst
-xildoff  -I../../include -I../../exports/include/X11  -I../..
-I../../exports/include -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386     
-DSVR4 -DCPP_PROGRAM="\"/usr/ccs/lib/cpp\"" -DHAS_MERGE_CONSTANTS=`if cc
-fmerge-constants -xc /dev/null -S -o /dev/null 2> /dev/null 1> /dev/null;
then echo 1; else echo 0; fi`        -c imake.c
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
gcc: unrecognized option `-Xa'
gcc: unrecognized option `-zlazyload'
gcc: unrecognized option `-zcombreloc'
Configured with: /builds/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-multilib --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
gcc: language ildoff not recognized
gcc: imake.c: linker input file unused because linking not done
rm -f imake
LD_RUN_PATH=/usr/pkg/xorg/lib cc -o imake -xO4 -xstrconst -xpentium -Xa -v
-zlazyload -zcombreloc -xstrconst -xildoff  -Wl,-M,/usr/lib/ld/map.noexstk
   imake.o     -lsocket -lnsl  -Wl,-z,lazyload
gcc: imake.o: No such file or directory
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
gcc: unrecognized option `-Xa'
gcc: unrecognized option `-zlazyload'
gcc: unrecognized option `-zcombreloc'
Configured with: /builds/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-multilib --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
*** Error code 1

Stop.
bmake: stopped in /export/home/pkgsrc/x11/xorg-imake/work/xc/config/imake
*** Error code 1

Stop.
bmake: stopped in /export/home/pkgsrc/x11/xorg-imake/work/xc
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/x11/xorg-imake
===>
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /export/home/pkgsrc/x11/xorg-imake/work/.work.log
===>
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/x11/xorg-imake