Bug 150442 - [patch] games/frogatto: prevent ld(1) from picking up wrong -lst=
Summary: [patch] games/frogatto: prevent ld(1) from picking up wrong -lst=
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-09 17:20 UTC by swell.k
Modified: 2010-09-22 11:42 UTC (History)
0 users

See Also:


Attachments
a.diff (877 bytes, patch)
2010-09-09 17:20 UTC, swell.k
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description swell.k 2010-09-09 17:20:00 UTC
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<graphics::texture, std::allocator<g=
raphics::texture> >::_M_insert(std::_List_iterator<graphics::texture>, 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<graphics::texture, std::allocator<g=
raphics::texture> >::_M_erase(std::_List_iterator<graphics::texture>)':
/usr/pkg/lib/gcc45/include/c++/bits/stl_list.h:1451: undefined reference to=
 `std::_List_node_base::_M_unhook()'
gmake: *** [game] Error 1
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-09-09 17:20:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->danfe

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2010-09-22 11:37:58 UTC
danfe       2010-09-22 10:37:51 UTC

  FreeBSD ports repository

  Modified files:
    games/frogatto       Makefile distinfo 
  Log:
  - Update to version 1.0.3
  - Prevent ld(1) from picking up wrong -lstdc++ when using non-default
    compiler (e.g. GCC from ports) and thus unbreak the build [1]
  - Mute chmod(1) command
  - Adjust Makefile header and touch couple of comments while here
  
  PR:     ports/150442 [1]
  
  Revision  Changes    Path
  1.5       +7 -6      ports/games/frogatto/Makefile
  1.2       +3 -3      ports/games/frogatto/distinfo
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2010-09-22 11:41:55 UTC
State Changed
From-To: open->closed

Fixed in Makefile rev. 1.5; thanks!