pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/46445 (emulators/simh has leftover patch files)
The following reply was made to PR pkg/46445; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: pkg/46445 (emulators/simh has leftover patch files)
Date: Sat, 26 May 2012 20:06:55 +0900
> Synopsis: emulators/simh has leftover patch files
:
> I can build okay on NetBSD-5.1.2.
> How to fail on your environment?
Fails NetBSD/i386 6.0_BETA (probably ports which have ldconfig(1)
and a.out compat support):
---
gcc -std=c99 -U__STRICT_ANSI__ -O2 -finline-functions -fgcse-after-reload
-fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations
-fno-strict-overflow -flto -fwhole-program -Wno-unused-result -I .
-D_GNU_SOURCE -DHAVE_DLOPEN=so PDP1/pdp1_lp.c PDP1/pdp1_cpu.c
PDP1/pdp1_stddev.c PDP1/pdp1_sys.c PDP1/pdp1_dt.c PDP1/pdp1_drm.c
PDP1/pdp1_clk.c PDP1/pdp1_dcs.c scp.c sim_console.c sim_fio.c sim_timer.c
sim_sock.c sim_tmxr.c sim_ether.c sim_tape.c -I PDP1 -o BIN/pdp1 -L/usr/lib
-Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -R/usr/pkg/lib -flto
-fwhole-program
/var/tmp//ccsc35b7.o: In function `drm':
pdp1_drm.c:(.text+0x6e9): undefined reference to `fmod'
pdp1_drm.c:(.text+0x702): undefined reference to `fmod'
pdp1_drm.c:(.text+0x71b): undefined reference to `fmod'
pdp1_drm.c:(.text+0x734): undefined reference to `fmod'
gmake: *** [BIN/pdp1] Error 1
---
This is because simh/makefile override LIBPATH value
if ldconfig(1) returns any dirs:
---
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk
'{print $$3}' | sed 's/:/ /g')
ifneq (,$(LDSEARCH))
LIBPATH := $(LDSEARCH)
endif
---
NetBSD doesn't have ldconfig(1) for ELF binaries,
but NetBSD's ldconfig(1) returns a.out compat paths
if a.out compat environment is prepared:
---
% ldconfig -r
/var/run/ld.so.hints:
search directories: /emul/aout/usr/local/lib:/emul/aout/usr/X11R6/lib
0:-lbfd.2.0 => /emul/aout//usr/lib/libbfd.so.2.0
1:-lbz2.0.0 => /emul/aout//usr/lib/libbz2.so.0.0
2:-lcrypt.0.0 => /emul/aout//usr/lib/libcrypt.so.0.0
---
Disabling the above ldconfig check fixes the problem.
---
--- makefile.orig 2012-04-23 07:28:04.000000000 +0000
+++ makefile
@@ -110,9 +110,12 @@ ifeq ($(WIN32),) #*nix Environments (&&
PCAPLIB = wpcap
LIBEXT = a
else
- LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk
'{print $$3}' | sed 's/:/ /g')
- ifneq (,$(LDSEARCH))
- LIBPATH := $(LDSEARCH)
+ # NetBSD's ldconfig is used only for old a.out binaries
+ ifneq (NetBSD,$(OSTYPE))
+ LDSEARCH :=$(shell ldconfig -r | grep 'search directories' |
awk '{print $$3}' | sed 's/:/ /g')
+ ifneq (,$(LDSEARCH))
+ LIBPATH := $(LDSEARCH)
+ endif
endif
ifeq (usrpkglib,$(shell if $(TEST) -d /usr/pkg/lib; then echo
usrpkglib; fi))
LIBPATH += /usr/pkg/lib
---
Home |
Main Index |
Thread Index |
Old Index