Subject: Re: build problem
To: None <current-users@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: current-users
Date: 04/15/2005 14:59:36
--+xNpyl7Qekk2NvDX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Luke Mewburn --> current-users (2005-04-15 12:55:10 +1000):
> On Thu, Apr 14, 2005 at 06:35:43PM +0200, Jukka Salmi wrote:
>   | Yes, I'm building for embedded devices. I choose to set some MK* variables
>   | to 'no' because
>   | - my build host is not really fast / I'm not patient enough
>   | - to keep the system size small, I don't want the binaries to be linked
>   |   with libraries I don't need
> 
> That's what the "USE_FOO" variables are foo.  E.g,
> 	USE_HESIOD=no
> 	USE_INET6=no
> 	USE_KERBEROS4=no
> 	USE_KERBEROS=no
> 	USE_PAM=no
> 	USE_SKEY=no
> 	USE_YP=no
> 
> It prevents the _use_ of those subsystems by our tools, even if the
> librarires for those subsystems are built.

Sure, but it doesn't reduce build time. OK, that's not really a problem,
but being able to do so is a convenient feature IMHO.

So, is the use of MKxxx variables "not supported"? Reading mk/bsd.README
makes me think they are meant to be set by users, as opposed to the NOxxx
variables which are "not intended for users".


> (I haven't recently tested all of these set to `no').

I just tried; it fails in sbin/ping6:

#      link  ping6/ping6
/opt/tools/i386/bin/i386--netbsdelf-gcc -Wl,-nostdlib     -o ping6  -Wl,-dynamic-linker=/libexec/ld.elf_so -Wl,-rpath-link,/opt/dst/i386.embed/lib:/opt/dst/i386.embed/usr/lib  -R/lib  -L/opt/dst/i386.embed/lib  -B/opt/dst/i386.embed/usr/lib/ -B/opt/dst/i386.embed/usr/lib/   ping6.o -lipsec -lm   -L/opt/dst/i386.embed/usr/lib -L/opt/dst/i386.embed/usr/lib
ping6.o(.text+0x1170): In function `main':
: undefined reference to `inet6_rthdr_init'
ping6.o(.text+0x11d3): In function `main':
: undefined reference to `inet6_rthdr_add'
ping6.o(.text+0x1204): In function `main':
: undefined reference to `inet6_rthdr_lasthop'
ping6.o(.text+0x166f): In function `main':
: undefined reference to `inet6_rthdr_space'
collect2: ld returned 1 exit status
  
*** Failed target:  ping6
*** Failed command: /opt/tools/i386/bin/i386--netbsdelf-gcc -Wl,-nostdlib -o ping6 -Wl,-dynamic-linker=/libexec/ld.elf_so -Wl,-rpath-link,/opt/dst/i386.embed/lib:/opt/dst/i386.embed/usr/lib -R/lib -L/opt/dst/i386.embed/lib -B/opt/dst/i386.embed/usr/lib/ -B/opt/dst/i386.embed/usr/lib/ ping6.o -lipsec -lm -L/opt/dst/i386.embed/usr/lib -L/opt/dst/i386.embed/usr/lib
*** Error code 1
  
Stop.
nbmake: stopped in /usr/src/sbin/ping6
  
*** Failed target:  dependall
*** Failed command: cd /usr/src/sbin/ping6; /opt/tools/i386/bin/nbmake realall


I applied what I attached to this message as p1 and tried again. It
failed later in usr.sbin/mld6query:

#      link  mld6query/mld6query
/opt/tools/i386/bin/i386--netbsdelf-gcc -Wl,-nostdlib     -o mld6query  -Wl,-rpath-link,/opt/dst/i386.embed/lib:/opt/dst/i386.embed/usr/lib  -L/opt/dst/i386.embed/lib  -B/opt/dst/i386.embed/usr/lib/ -B/opt/dst/i386.embed/usr/lib/   mld6.o   -L/opt/dst/i386.embed/usr/lib -L/opt/dst/i386.embed/usr/lib
mld6.o(.text+0x387): In function `make_msg':
: undefined reference to `inet6_option_space'
mld6.o(.text+0x44b): In function `make_msg':
: undefined reference to `inet6_option_init'
mld6.o(.text+0x470): In function `make_msg':
: undefined reference to `inet6_option_append'
collect2: ld returned 1 exit status
  
*** Failed target:  mld6query
*** Failed command: /opt/tools/i386/bin/i386--netbsdelf-gcc -Wl,-nostdlib -o mld6query -Wl,-rpath-link,/opt/dst/i386.embed/lib:/opt/dst/i386.embed/usr/lib -L/opt/dst/i386.embed/lib -B/opt/dst/i386.embed/usr/lib/ -B/opt/dst/i386.embed/usr/lib/ mld6.o -L/opt/dst/i386.embed/usr/lib -L/opt/dst/i386.embed/usr/lib
*** Error code 1
  
Stop.
nbmake: stopped in /usr/src/usr.sbin/mld6query


I applied p2, and building succeeded (but later failed because of
"Files in flist but missing from DESTDIR").

Do p1 and p2 make any sense, or how should this be fixed?


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

--+xNpyl7Qekk2NvDX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p1

--- src/sbin/Makefile.orig	2005-01-15 21:26:10.000000000 +0100
+++ src/sbin/Makefile	2005-04-15 11:43:13.000000000 +0200
@@ -42,7 +42,7 @@
 SUBDIR+= cgdconfig
 .endif
 
-.if (${MKINET6} != "no")
+.if (${USE_INET6} != "no")
 SUBDIR+= ping6 rtsol
 .endif
 

--+xNpyl7Qekk2NvDX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p2

--- src/usr.sbin/Makefile.orig	2005-02-25 19:54:40.000000000 +0100
+++ src/usr.sbin/Makefile	2005-04-15 13:38:32.000000000 +0200
@@ -34,7 +34,7 @@
 SUBDIR+= mdsetimage
 .endif
 
-.if (${MKINET6} != no)
+.if (${USE_INET6} != no)
 SUBDIR+=faithd ifmcstat mld6query ndp \
 	rip6query route6d rtadvd traceroute6 rtsold
 .endif

--+xNpyl7Qekk2NvDX--