Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Feb 2001 18:28:10 +0900
From:      "Akinori MUSHA" <knu@iDaemons.org>
To:        Jun Kuriyama <kuriyama@FreeBSD.org>
Cc:        obrien@FreeBSD.org, current@FreeBSD.org
Subject:   Re: cvs commit: ports/palm/pilot-link Makefile
Message-ID:  <86y9v8qor9.wl@archon.local.idaemons.org>
In-Reply-To: <200102142250.f1EMoP580644@freefall.freebsd.org>
References:  <200102142250.f1EMoP580644@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At Wed, 14 Feb 2001 14:50:25 -0800 (PST),
Jun Kuriyama wrote:
> kuriyama    2001/02/14 14:50:25 PST
> 
>   Modified files:
>     palm/pilot-link      Makefile 
>   Log:
>   - Add write permission at post-patch stage to be able to build
>     by non-root users.
>   - Remove -O flag from CFLAGS due to c++'s optimization bug.

Seems you can avoid the problem by adding the following line to
Makefile instead of eliminating -O* from CFLAGS.

CXXFLAGS+=      -fPIC

Now, I make a bug report out of this case for David.  First, I have
the following environment here:


knu@archon[2]% uname -a
FreeBSD archon.local.idaemons.org 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Feb 14 16:49:24 JST 2001     root@archon.local.idaemons.org:/villa/work/obj/freebsd/src/usr/local/src/sys/ARCHON  i386
knu@archon[2]% gcc --version
2.95.3
knu@archon[2]% make -V CFLAGS
-O -march=pentiumpro -pipe


And then when I try to build the palm/pilot-link port as of yesterday,
I get this:


knu@archon[2]% make
===>  Extracting for pilot-link-0.9.3
>> Checksum OK for pilot-link.0.9.3.tar.gz.
===>   pilot-link-0.9.3 depends on executable: libtool - found
===>   pilot-link-0.9.3 depends on shared library: tk82.1 - found
===>  Patching for pilot-link-0.9.3
===>  Applying FreeBSD patches for pilot-link-0.9.3
===>  Configuring for pilot-link-0.9.3
creating cache ./config.cache
checking host system type... i386--freebsd5.0
checking for gcc... cc
checking whether the C compiler (cc -O -march=pentiumpro -pipe ) works... yes
checking whether the C compiler (cc -O -march=pentiumpro -pipe ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c -o root -g wheel
checking for ranlib... ranlib
checking for ld used by GCC... /usr/libexec/elf/ld
checking if the linker (/usr/libexec/elf/ld) is GNU ld... yes
checking for BSD-compatible nm... test: /home/knu/bin/nm: unexpected operator
/usr/bin/nm -B
checking whether ln -s works... yes
checking for object suffix... o
checking for executable suffix... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.lo... yes
checking if cc supports -fno-rtti -fno-exceptions ... yes
checking if cc static flag -static works... -static
checking if the linker (/usr/libexec/elf/ld) is GNU ld... yes
checking whether the linker (/usr/libexec/elf/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... ok
checking how to hardcode library paths into programs... immediate
checking for /usr/libexec/elf/ld option to reload object files... -r
checking dynamic linker characteristics... freebsd5.0 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
checking for ranlib... (cached) ranlib
checking for bison... no
checking for byacc... byacc
checking for c++... c++
checking whether C++ compiler (c++  ) works... yes
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for main in -lg++... no
checking for ldexp in -lm... yes
checking for alloca in -lPW... no
checking for readline... 2.1
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for fcntl.h... yes
checking for malloc.h... no
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for sys/ioctl_compat.h... yes
checking for memory.h... yes
checking for string.h... yes
checking for strings.h... yes
checking for unistd.h... yes
checking for stdlib.h... yes
checking for netinet/in.h... yes
checking for dirent.h... yes
checking for sys/ndir.h... no
checking for sys/dir.h... no
checking for ndir.h... no
checking for sys/select.h... yes
checking for sockio.h... no
checking for netdb.h... yes
checking for sys/utsname.h... yes
checking for working const... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for connect... yes
checking for gethostbyname... yes
checking for main in -linet... no
checking whether cc needs -traditional... no
checking return type of signal handlers... void
checking for atexit... yes
checking for strchr... yes
checking for strdup... yes
checking for memcpy... yes
checking for memmove... yes
checking for strtoul... yes
checking for cfmakeraw... yes
checking for cfsetspeed... yes
checking for cfsetispeed... yes
checking for cfsetospeed... yes
checking for sigaction... yes
checking for dup2... yes
checking for inet_aton... yes
checking for gethostname... yes
checking for uname... yes
checking for putenv... yes
checking for cispeed and cospeed members of struct termios... yes
checking for sa_len... yes
checking for Java Development Kit... not found
checking for Tcl... version 8.2 from /usr/local/lib/tcl8.2/tclConfig.sh
checking for Itcl... not found
checking for Tk... version 8.2 from /usr/local/lib/tk8.2/tkConfig.sh
checking for python... /usr/local/bin/python
checking for Python... Python version 2.0 in /usr/local/lib/python2.0
checking for maximum warnings compiler flag...
updating cache ./config.cache
creating ./config.status
creating libsock/Makefile
creating libcc/Makefile
creating Makefile
creating dubious/Makefile
creating Python/Makefile
creating Tcl/Makefile
creating Perl5/Makefile.PL
creating Java/Makefile
creating tests/Makefile
creating include/pi-config.h
creating include/pi-sockaddr.h
===>  Building for pilot-link-0.9.3
(...snip...)
c++ -I./include -I./include -O -march=pentiumpro -pipe -DREADLINE_2_1 -DLIBDIR=\"/usr/local/pilot/lib\" -DTCL -DTK -I/usr/local/include/tcl8.2 -I/usr/local/include/tk8.2 -I/usr/X11R6/include iambicexample.o libsock/.libs/libpisock.so getopt.o getopt1.o libcc/libpicc.a -o .libs/iambicexample -lm  -Wl,--rpath -Wl,/usr/local/pilot/lib
iambicexample.o: In function `main':
iambicexample.o(.text+0x11b9): undefined reference to `L765'
*** Error code 1

Stop in /villa/work/obj/freebsd/ports/villa/work/src/freebsd/ports/palm/pilot-link/work/pilot-link.0.9.3.
*** Error code 1

Stop in /villa/work/src/freebsd/ports/palm/pilot-link.
*** Error code 1

Stop in /villa/work/src/freebsd/ports/palm/pilot-link.
*** Error code 1

Stop in /villa/work/src/freebsd/ports/palm/pilot-link.


On the other hand, on another box it goes fine:


knu@daemon[1]% uname -a
FreeBSD daemon.local.idaemons.org 4.2-STABLE FreeBSD 4.2-STABLE #0: Wed Jan 31 16:01:53 JST 2001     root@daemon.local.idaemons.org:/var/work/world/usr/src/sys/DAEMON  i386
knu@daemon[1]% gcc --version
2.95.2
knu@daemon[1]% make -V CFLAGS
-O -march=pentiumpro -pipe
knu@daemon[1]% make
===>  Extracting for pilot-link-0.9.3
>> Checksum OK for pilot-link.0.9.3.tar.gz.
===>   pilot-link-0.9.3 depends on executable: libtool - found
===>   pilot-link-0.9.3 depends on shared library: tk82.1 - found
===>  Patching for pilot-link-0.9.3
===>  Applying FreeBSD patches for pilot-link-0.9.3
===>  Configuring for pilot-link-0.9.3
creating cache ./config.cache
checking host system type... i386--freebsd4.2
checking for gcc... cc
checking whether the C compiler (cc -O -march=pentiumpro -pipe ) works... yes
checking whether the C compiler (cc -O -march=pentiumpro -pipe ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c -o root -g wheel
checking for ranlib... ranlib
checking for ld used by GCC... /usr/libexec/elf/ld
checking if the linker (/usr/libexec/elf/ld) is GNU ld... yes
checking for BSD-compatible nm... test: /home/knu/bin/nm: unexpected operator
/usr/bin/nm -B
checking whether ln -s works... yes
checking for object suffix... o
checking for executable suffix... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.lo... yes
checking if cc supports -fno-rtti -fno-exceptions ... yes
checking if cc static flag -static works... -static
checking if the linker (/usr/libexec/elf/ld) is GNU ld... yes
checking whether the linker (/usr/libexec/elf/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... ok
checking how to hardcode library paths into programs... immediate
checking for /usr/libexec/elf/ld option to reload object files... -r
checking dynamic linker characteristics... freebsd4.2 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
checking for ranlib... (cached) ranlib
checking for bison... bison -y
checking for c++... c++
checking whether C++ compiler (c++  ) works... yes
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for main in -lg++... no
checking for ldexp in -lm... yes
checking for alloca in -lPW... no
checking for readline... 2.1
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for fcntl.h... yes
checking for malloc.h... no
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for sys/ioctl_compat.h... yes
checking for memory.h... yes
checking for string.h... yes
checking for strings.h... yes
checking for unistd.h... yes
checking for stdlib.h... yes
checking for netinet/in.h... yes
checking for dirent.h... yes
checking for sys/ndir.h... no
checking for sys/dir.h... no
checking for ndir.h... no
checking for sys/select.h... yes
checking for sockio.h... no
checking for netdb.h... yes
checking for sys/utsname.h... yes
checking for working const... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for connect... yes
checking for gethostbyname... yes
checking for main in -linet... no
checking whether cc needs -traditional... no
checking return type of signal handlers... void
checking for atexit... yes
checking for strchr... yes
checking for strdup... yes
checking for memcpy... yes
checking for memmove... yes
checking for strtoul... yes
checking for cfmakeraw... yes
checking for cfsetspeed... yes
checking for cfsetispeed... yes
checking for cfsetospeed... yes
checking for sigaction... yes
checking for dup2... yes
checking for inet_aton... yes
checking for gethostname... yes
checking for uname... yes
checking for putenv... yes
checking for cispeed and cospeed members of struct termios... yes
checking for sa_len... yes
checking for Java Development Kit... not found
checking for Tcl... version 8.2 from /usr/local/lib/tcl8.2/tclConfig.sh
checking for Itcl... not found
checking for Tk... version 8.2 from /usr/local/lib/tk8.2/tkConfig.sh
checking for python... /usr/local/bin/python
checking for Python... Python version 1.5.2 in /usr/local/lib/python1.5
checking for maximum warnings compiler flag...
updating cache ./config.cache
creating ./config.status
creating libsock/Makefile
creating libcc/Makefile
creating Makefile
creating dubious/Makefile
creating Python/Makefile
creating Tcl/Makefile
creating Perl5/Makefile.PL
creating Java/Makefile
creating tests/Makefile
creating include/pi-config.h
creating include/pi-sockaddr.h
===>  Building for pilot-link-0.9.3
(..snip..)
c++ -I./include -I./include  -O -march=pentiumpro -pipe  -DREADLINE_2_1 -DLIBDIR=\"/usr/local/pilot/lib\" -DTCL -DTK -I/usr/local/include/tcl8.2 -I/usr/local/include/tk8.2 -I/usr/X11R6/include -c iambicexample.cc
./libtool --mode=link   c++  -I./include -I./include  -O -march=pentiumpro -pipe  -DREADLINE_2_1 -DLIBDIR=\"/usr/local/pilot/lib\" -DTCL -DTK -I/usr/local/include/tcl8.2 -I/usr/local/include/tk8.2 -I/usr/X11R6/include iambicexample.o libsock/libpisock.la getopt.o getopt1.o libcc/libpicc.a -o iambicexample  -lm
c++ -I./include -I./include -O -march=pentiumpro -pipe -DREADLINE_2_1 -DLIBDIR=\"/usr/local/pilot/lib\" -DTCL -DTK -I/usr/local/include/tcl8.2 -I/usr/local/include/tk8.2 -I/usr/X11R6/include iambicexample.o libsock/.libs/libpisock.so getopt.o getopt1.o libcc/libpicc.a -o .libs/iambicexample -lm  -Wl,--rpath -Wl,/usr/local/pilot/lib
creating iambicexample
/usr/bin/perl5.00503 pilot-undelete.PL > pilot-undelete
chmod +x pilot-undelete
/usr/bin/perl5.00503 ietf2datebook.PL > ietf2datebook
chmod +x ietf2datebook
/usr/bin/perl5.00503 sync-plan.PL > sync-plan
chmod +x sync-plan
(done)


However, if I put either:

CXXFLAGS+=	-fPIC

or:

CFLAGS!=	${ECHO} "${CFLAGS}" | ${SED} -e 's/-O[0-9a-z]*//g'

(as Kuriyama-san has just added today) it builds fine on 5-CURRENT.

David, would you investigate this?

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"We're only at home when we're on the run, on the wing, on the fly"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86y9v8qor9.wl>