From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 9 16:20:01 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22D5410656BE for ; Thu, 9 Sep 2010 16:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D2D218FC18 for ; Thu, 9 Sep 2010 16:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o89GK0M4027777 for ; Thu, 9 Sep 2010 16:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o89GK0B5027776; Thu, 9 Sep 2010 16:20:00 GMT (envelope-from gnats) Resent-Date: Thu, 9 Sep 2010 16:20:00 GMT Resent-Message-Id: <201009091620.o89GK0B5027776@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Anonymous Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F59610656C6 for ; Thu, 9 Sep 2010 16:17:20 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id E49848FC15 for ; Thu, 9 Sep 2010 16:17:19 +0000 (UTC) Received: by eyx24 with SMTP id 24so1169840eyx.13 for ; Thu, 09 Sep 2010 09:17:18 -0700 (PDT) Received: by 10.213.22.18 with SMTP id l18mr71879ebb.85.1284049038628; Thu, 09 Sep 2010 09:17:18 -0700 (PDT) Received: from localhost (tor-exit-proxy5-readme.formlessnetworking.net [208.53.142.41]) by mx.google.com with ESMTPS id u9sm2239597eeh.11.2010.09.09.09.17.14 (version=SSLv3 cipher=RC4-MD5); Thu, 09 Sep 2010 09:17:17 -0700 (PDT) Message-Id: <86aanqvqn8.fsf@gmail.com> Date: Thu, 09 Sep 2010 20:16:27 +0400 From: Anonymous To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/150442: [patch] games/frogatto: prevent ld(1) from picking up wrong -lstdc++ X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2010 16:20:01 -0000 >Number: 150442 >Category: ports >Synopsis: [patch] games/frogatto: prevent ld(1) from picking up wrong -lst= >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 09 16:20:00 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: LOCALBASE =3D /usr/pkg boost-libs compiled with gcc45 and linked against gcc45's -lstdc++ >Description: When compiling the port with gcc45 linker first tries to use gcc's own -lstdc++ in LOCALBASE/lib/gcc45. But if you specify -L/usr/lib on command line it'll use -lstdc++ from our ancient gcc42 in base. IOW, let gcc decide where to search for it's own -lstdc++. And while here remove -L/sw/lib as well, we don't have /sw in our hier(7). >How-To-Repeat: $ echo 'int main(void) { return(0); }' | g++45 -xc++ -o/dev/null - -Wl,--ve= rbose |& fgrep -- -lstdc++ -lstdc++ (/usr/pkg/lib/gcc45/gcc/x86_64-portbld-freebsd9.0/4.5.2/../../../l= ibstdc++.so) $ realpath /usr/pkg/lib/gcc45/gcc/x86_64-portbld-freebsd9.0/4.5.2/../../../= libstdc++.so /usr/pkg/lib/gcc45/libstdc++.so.6 $ echo 'int main(void) { return(0); }' | g++45 -xc++ -o/dev/null - -Wl,--ve= rbose -L/usr/lib |& fgrep -- -lstdc++ -lstdc++ (/usr/lib/libstdc++.so) $ make ... g++45 -O2 -pipe -fno-strict-aliasing -fno-inline-functions -L. -L/sw/lib -= L/usr/pkg/lib -L. -lX11 -D_GNU_SOURCE=3D1 -D_REENTRANT -Wnon-virtual-dtor -= Wreturn-type -L/usr/lib `sdl-config --libs` -lSDLmain -lSDL -lGL -lGLU -lGL= EW -lSDL_image -lSDL_ttf -lSDL_mixer -lpng -lboost_regex -lboost_system -ft= hreadsafe-statics IMG_savepng.o background.o blur.o border_widget.o button.= o character_editor_dialog.o current_generator.o editor_dialogs.o editor_for= mula_functions.o editor_layers_dialog.o editor_stats_dialog.o editor_variab= le_info.o collision_utils.o color_utils.o controls.o custom_object.o custom= _object_callable.o custom_object_functions.o custom_object_type.o debug_con= sole.o dialog.o draw_number.o draw_scene.o draw_tile.o editor.o editor_leve= l_properties_dialog.o entity.o filesystem.o font.o formula.o formula_callab= le_definition.o formula_constants.o formula_function.o formula_profiler.o f= ormula_tokenizer.o formula_variable_storage.o frame.o framed_gui_element.o = geometry.o graphical_font.o graphical_font_label.o grid_widget.o group_prop= erty_editor_dialog.o gui_formula_functions.o gui_section.o image_widget.o i= nput.o inventory.o iphone_controls.o joystick.o key.o label.o level.o level= _logic.o level_object.o level_runner.o level_solid_map.o load_level_nothrea= d.o main.o message_dialog.o movement_script.o multi_tile_pattern.o multipla= yer.o object_events.o options_dialog.o particle_system.o pause_game_dialog.= o playable_custom_object.o player_info.o powerup.o preferences.o preprocess= or.o preview_tileset_widget.o property_editor_dialog.o random.o raster.o ra= ster_distortion.o rectangle_rotator.o settings_dialog.o solid_map.o sound.o= speech_dialog.o stats.o string_utils.o surface_cache.o surface_formula.o s= urface_palette.o surface_scaling.o surface.o texture.o text_entry_widget.o = thread.o tile_map.o tileset_editor_dialog.o tooltip.o translate.o utils.o v= ariant.o water.o water_particle_system.o weather_particle_system.o widget.o= wml_formula_adapter.o wml_formula_callable.o wml_modify.o wml_node.o wml_p= arser.o wml_schema.o wml_utils.o wml_writer.o unit_test.o formula_test.o wm= l_parser_test.o loading_screen.o utility_object_compiler.o utility_object_e= ditor.o -o game collect2: ld terminated with signal 11 [Segmentation fault: 11] debug_console.o: In function `std::list >::_M_insert(std::_List_iterator, grap= hics::texture const&)': /usr/pkg/lib/gcc45/include/c++/bits/stl_list.h:1435: undefined reference to= `std::_List_node_base::_M_hook(std::_List_node_base*)' debug_console.o: In function `std::list >::_M_erase(std::_List_iterator)': /usr/pkg/lib/gcc45/include/c++/bits/stl_list.h:1451: undefined reference to= `std::_List_node_base::_M_unhook()' gmake: *** [game] Error 1 >Fix: --- a.diff begins here --- Index: games/frogatto/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /a/.cvsup/ports/games/frogatto/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- games/frogatto/Makefile 22 Aug 2010 14:29:08 -0000 1.4 +++ games/frogatto/Makefile 9 Sep 2010 16:14:03 -0000 @@ -31,6 +31,7 @@ post-patch: @${REINPLACE_CMD} -E -e 's,(ccache )?g\+\+,$$(CXX) $$(CXXFLAGS),' \ -e 's,-O2,, ; s,-g,, ; s,/usr/X11R6,${LOCALBASE},' \ -e 's,-mt,,g ; /server/s,`.*mixer,${PTHREAD_LIBS},' \ + -e 's,-L/usr/lib,, ; s,-L/sw/lib,,' \ -e '/server/s,-lX11,,' ${WRKSRC}/Makefile # Point to the right location where look for the resources on FreeBSD @${REINPLACE_CMD} -e 's,HAVE_CONFIG_H,__FreeBSD__,' \ --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: dc++