So I'm getting these weird C++ errors linking games/bzflag in my environment (NetBSD/amd64 9.99.81). At first I though the appearance of "-static" was bleeding through from some of my hacks to static-link more things in pkgsrc, despite the fact I had explicitly disabled those hacks for games/bzflag. However I see it is actually in the original source: $ make extract $ cd $(make show-var VARNAME=WRKSRC) $ fgrep static src/bzfs/Makefile.am bzfs_LDFLAGS = -export-dynamic -static If I actually remove that "-static" from the original Makefile, then it links without any errors. However I also note that there's an official build of the package available, so it must link OK in a completely stock environment. I don't know enough about C++ to know what might be the problem in my environment -- I only find "mangled"(?) symbols that might match the undefined ones in my /usr/lib/libc++.a (and the same in libc++.so). /bin/sh ../../libtool --silent --tag=CXX --silent --mode=link c++ -std=gnu++11 -fexpensive-optimizations -O2 -g -pipe -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/pkg/include/SDL2 -I/usr/X11R7/include -I/usr/X11R7/include/libdrm -I/usr/include -export-dynamic -static -Wl,-zrelro -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/lib -Wl,-R/usr/lib -o bzfs bzfsPlugins.o AccessControlList.o Authentication.o BanCommands.o base64.o bzfsAPI.o bzfsHTTPAPI.o BZWError.o BZWReader.o CmdLineOptions.o CustomArc.o CustomBase.o CustomBox.o CustomCone.o CustomDynamicColor.o CustomGate.o CustomGroup.o CustomLink.o CustomMaterial.o CustomMesh.o CustomMeshFace.o CustomMeshTransform.o CustomPhysicsDriver.o CustomSphere.o CustomTextureMatrix.o CustomPyramid.o CustomTetra.o CustomWaterLevel.o CustomWeapon.o CustomWorld.o CustomZone.o DropGeometry.o EntryZones.o Filter.o FlagHistory.o FlagInfo.o GameKeeper.o ListServerConnection.o MasterBanList.o ParseMaterial.o Permissions .o RandomSpawnPolicy.o RecordReplay.o RejoinList.o Score.o ServerCommand.o ServerSidePlayer.o ShotManager.o SpawnPolicy.o SpawnPosition.o TeamBases.o VotingArbiter.o WorldFileLocation.o WorldFileObject.o WorldFileObstacle.o WorldGenerators.o WorldInfo.o WorldWeapons.o WorldEventManager.o commands.o bzfs.o ../obstacle/libObstacle.la ../game/libGame.la ../net/libNet.la ../common/libCommon.la -Wl,-zrelro -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/lib -L/usr/pkg/lib -L/usr/pkg/lib -L/usr/pkg/lib -lcurl -lcares -lc -lz ../date/libDate.la -lm -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lcurl -lpthread ld: AccessControlList.o: in function `AccessControlList::load()': /build/package-obj/root/games/bzflag/work/bzflag-2.4.22/src/bzfs/AccessControlList.cxx:510: undefined reference to `std::istream::ignore(long)' ld: /build/package-obj/root/games/bzflag/work/bzflag-2.4.22/src/bzfs/AccessControlList.cxx:518: undefined reference to `std::istream::ignore(long)' ld: /build/package-obj/root/games/bzflag/work/bzflag-2.4.22/src/bzfs/AccessControlList.cxx:486: undefined reference to `std::istream::ignore(long)' ld: AccessControlList.o: in function `AccessControlList::merge(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /build/package-obj/root/games/bzflag/work/bzflag-2.4.22/src/bzfs/AccessControlList.cxx:594: undefined reference to `std::istream::ignore(long)' ld: /build/package-obj/root/games/bzflag/work/bzflag-2.4.22/src/bzfs/AccessControlList.cxx:602: undefined reference to `std::istream::ignore(long)' ld: AccessControlList.o:/build/package-obj/root/games/bzflag/work/bzflag-2.4.22/src/bzfs/AccessControlList.cxx:571: more undefined references to `std::istream::ignore(long)' follow gmake[2]: *** [Makefile:704: bzfs] Error 1 -- Greg A. Woods <gwoods%acm.org@localhost> Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost> Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgp6NmTfo7hzC.pgp
Description: OpenPGP Digital Signature