From owner-freebsd-java Wed Jul 18 7:28: 0 2001 Delivered-To: freebsd-java@freebsd.org Received: from naboo.ethz.ch (naboo.ethz.ch [129.132.17.66]) by hub.freebsd.org (Postfix) with ESMTP id A0B1E37B403 for ; Wed, 18 Jul 2001 07:27:57 -0700 (PDT) (envelope-from carlo@vis.ethz.ch) Received: by naboo.ethz.ch (Postfix, from userid 224) id 95325275B7; Wed, 18 Jul 2001 16:27:56 +0200 (CEST) Subject: Building JDK 1.3.1, gmake issue simplified To: freebsd-java@FreeBSD.ORG Date: Wed, 18 Jul 2001 16:27:56 +0200 (CEST) X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010718142756.95325275B7@naboo.ethz.ch> From: carlo@vis.ethz.ch (Carlo Dapor) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Dear Java afficionados ! Here is a summary of the difference between calling gmake w/ and w/o LINK.{c,cc}, after combing it to better understand. First, the output when overwriting LINK.c: gcc -shared -mimpure-text -o libhpi.so $(LIBHPI_SHARED_OBJECTS) -lm -lc Pretty strong comb I use, I know. Now, this changes into the following output fur me when run with gmake only: /usr/bin/gcc \ -W -Wall -Wno-unused -Wno-parentheses \ -Di386 -DARCH='"i386"' -DSOLARIS2 -DRELEASE='"1.3.1-internal"' \ -DFULL_VERSION='"1.3.1-internal-root-010718-09:37"' \ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_LITTLE_ENDIAN \ -DLOGGING \ -I.\ -I../../../../build/bsd-i386/tmp/java/hpi/green_threads/CClassHeaders \ -I../../../../src/solaris/javavm/export \ -I../../../../src/share/javavm/export \ -I../../../../src/solaris/hpi/green_threads/include \ -I../../../../src/solaris/hpi/include \ -I../../../../src/solaris/hpi/export \ -I../../../../src/share/hpi/include \ -I../../../../src/share/hpi/export \ -z defs \ -L../../../../build/bsd-i386/lib/i386 \ -Wl,-E \ -shared -mimpure-text -o libhpi.so $(LIBHPI_SHARED_OBJECTS) -lm -lc /usr/lib/libc.so: undefined reference to `environ' /usr/lib/libc.so: undefined reference to `__progname' gmake[4]: *** [../../../../build/bsd-i386/lib/i386/green_threads/libhpi.so] Error 1 The empty lines are my invention, by the way. Notice the dozen lines that are used, warning flags, definitions, include path directives, etc. It only confuses gcc, because the error (missing environ and __progname) tells me that it is conviced to have been asked to generate an executable, ignoring -shared !!! Is that because of '-lm -lc' in the end, I doubt that, since it works correctly in the first example. The easiest way out was to investigate on the definiton of CC, LDFLAGS etc. I compiled GNU make 3.79.1 just the other day, didn't modify any source files, same thing goes for GNU m4. Any way, I don;t think we have to spend a lot more time on this, right now. I keep the two build log files for future investigation, though. Have a successful day! Ciao, derweil, -- Carlo To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message