Subject: Re: compiler-related problems building lang/python2.2
To: NetBSD Packages Technical Discussion List <tech-pkg@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-pkg
Date: 05/08/2002 16:53:05
[ On Wednesday, May 8, 2002 at 14:58:24 (-0500), Frederick Bruckman wrote: ]
> Subject: Re: compiler-related problems building lang/python2.2
>
> On Wed, 8 May 2002, Greg A. Woods wrote:
> 
> > => Removing rpath references to buildlink directories.
> > ===> Building for python22-2.2.1
> > cc -c -DNDEBUG /opt -I. -I./Include -DHAVE_CONFIG_H  -o Modules/python.o Modules/python.c
>                  ^^^^
> > cc: cannot specify -o with -c or -S and multiple compilations
> > *** Error code 1
> >
> >
> > $ gcc --version
> > egcs-1.1.2
> > $ uname -srm
> > NetBSD 1.5W i386
> >
> > Why can't my gcc specify an output name for a .o file?
> 
> There's an argument missing. With two arguments lacking flags, it
> looks to gcc like you're specifying two sources. Probably, the command
> contains ${SOME_VARIABLE}/opt, where ${SOME_VARIABLE} is supposed to
> start with "-I", perhaps, but ${SOME_VARIABLE} is not defined.

Ah yes -- thanks for the reminder!  This has bugged me from the very
first day I ever encountered Python, and I seem to have to remember
this "quirk" to their build system every single time I try it again.

	$ echo $OPT
	/opt

<SOAPBOX>
Sometimes it really sucks when a build system uses environment variables
for things other than where they're normally used (eg. $PATH is OK,
other random junk like $OPT is not).  Make has its own "variables" --
why do we have to continually confuse them with environment variables?!?!?!
It's even worse when the "./configure" succeeds, but the 'make' fails.
</SOAPBOX>

I'd have remembered, but my memory got wiped out by the plethora of new
lang/python* modules replacing the old one where I had it stored....

$ cvs diff Makefile
Index: Makefile
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/lang/python22/Makefile,v
retrieving revision 1.3
diff -c -r1.3 Makefile
*** Makefile    15 Apr 2002 12:13:38 -0000      1.3
--- Makefile    8 May 2002 20:51:15 -0000
***************
*** 14,19 ****
--- 14,21 ----
  USE_BUILDLINK_ONLY=   YES
  GNU_CONFIGURE=                YES
  CONFIGURE_ARGS+=      --without-threads
+ MAKE_ENV+=            OPT=""
+ CONFIGURE_ENV+=               OPT=""
  
  INSTALL_TARGET=       altinstall
  

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>