miki151 / keeperrl

Source code of KeeperRL
GNU General Public License v2.0
874 stars 111 forks source link

Collect2: fatal error: cannot find 'ld' #1986

Open rotshine opened 1 year ago

rotshine commented 1 year ago

I do have a problem when compiling the source code on windows: the collect2 reports a fatal error saying that could not find ld, but it is installed on my environment:

g++ -Wall -std=c++1y -Wno-sign-compare -Wno-unused-variable -Wno-strict-aliasing -Wl,--build-id -Wa,-mbig-obj -I. -I./extern -Iextern/steamworks/public -Winvalid-pch -DWINDOWS -g -fno-omit-frame-pointer -DRELEASE -Wl,--large-address-aware -O2 -o keeper obj/zones.o obj/zlevel.o obj/z_level_info.o obj/workshops.o obj/workshop_item.o obj/window_view.o obj/warlord_controller.o obj/vision.o obj/visibility_map.o obj/villain_type.o obj/village_control.o obj/village_behaviour.o obj/view_object_action.o obj/view_object.o obj/view_index.o obj/view_id.o obj/view.o obj/video.o obj/variant_serialize.o obj/util.o obj/unzip.o obj/unlocks.o obj/unknown_locations.o obj/unique_entity.o obj/tutorial_state.o obj/tutorial.o obj/tribe_alignment.o obj/tribe.o obj/time_queue.o obj/tileset.o obj/tile_predicate.o obj/tile_paths.o obj/tile_gas.o obj/tile.o obj/theoraplay.o obj/texture.o obj/test.o obj/territory.o obj/technology.o obj/team_order.o obj/team_member_action.o obj/task_map.o obj/task.o obj/sunlight_info.o obj/storage_positions.o obj/stb_truetype.o obj/statistics.o obj/stair_key.o obj/stack_printer.o obj/square_array.o obj/square.o obj/spell_school.o obj/spell_map.o obj/spell.o obj/spectator.o obj/special_trait.o obj/sound_library.o obj/sound.o obj/sokoban_input.o obj/simple_game.o obj/shortest_path.o obj/serialization.o obj/sectors.o obj/sdl_keycodes.o obj/sdl_event_generator.o obj/scroll_position.o obj/scripted_ui.o obj/saved_game_info.o obj/retired_games.o obj/resource_counts.o obj/renderer.o obj/renderable.o obj/quarters.o obj/progress_meter.o obj/progress.o obj/pretty_printing.o obj/pretty_archive.o obj/position_matching.o obj/position_map.o obj/position.o obj/portals.o obj/player_role.o obj/player_message.o obj/player_control.o obj/player.o obj/perlin_noise.o obj/parse_game.o obj/options.o obj/opengl.o obj/navigation_flags.o obj/name_generator.o obj/music.o obj/movement_type.o obj/movement_set.o obj/movement_info.o obj/move_info.o obj/monster_ai.o obj/monster.o obj/model_builder.o obj/model.o obj/miniunz.o obj/minion_trait.o obj/minion_page_index.o obj/minion_equipment.o obj/minion_controller.o obj/minion_activity_map.o obj/minion_activity.o obj/minimap_gui.o obj/message_generator.o obj/map_memory.o obj/map_layouts.o obj/map_layout.o obj/map_gui.o obj/main_loop.o obj/main.o obj/level_maker.o obj/level_builder.o obj/level.o obj/layout_renderer.o obj/layout_generator.o obj/lasting_or_buff.o obj/lasting_effect.o obj/known_tiles.o obj/keybinding_map.o obj/key_verifier.o obj/keeper_creature_info.o obj/item_upgrade_info.o obj/item_type.o obj/item_prefix.o obj/item_list.o obj/item_index.o obj/item_factory.o obj/item_attributes.o obj/item.o obj/ioapi.o obj/inventory.o obj/intrinsic_attack.o obj/input_queue.o obj/inhabitants_info.o obj/immigration.o obj/immigrant_info.o obj/highscores.o obj/gzstream.o obj/gui_elem.o obj/gui_builder.o obj/gender.o obj/game_time.o obj/game_info.o obj/game_config.o obj/game.o obj/fx_view_manager.o obj/fx_vec.o obj/fx_texture_factory.o obj/fx_renderer.o obj/fx_particle_system.o obj/fx_math.o obj/fx_manager.o obj/fx_info.o obj/fx_factory.o obj/fx_emission_source.o obj/fx_draw_buffers.o obj/fx_curve.o obj/fx_color.o obj/furniture_usage.o obj/furniture_tick.o obj/furniture_on_built.o obj/furniture_list.o obj/furniture_factory.o obj/furniture_entry.o obj/furniture_dropped_items.o obj/furniture_click.o obj/furniture_array.o obj/furniture.o obj/furnace.o obj/framebuffer.o obj/fps_counter.o obj/fontstash.o obj/fire.o obj/file_sharing.o obj/file_path.o obj/field_of_view.o obj/external_enemies.o obj/experience_type.o obj/event_generator.o obj/equipment.o obj/entity_set.o obj/entity_map.o obj/enemy_info.o obj/enemy_factory.o obj/encyclopedia.o obj/effect.o obj/dungeon_level.o obj/draw_line.o obj/drag_and_drop.o obj/directory_path.o obj/destroy_action.o obj/debug.o obj/dancing.o obj/creature_status.o obj/creature_predicate.o obj/creature_name.o obj/creature_list.o obj/creature_inventory.o obj/creature_group.o obj/creature_factory.o obj/creature_experience_info.o obj/creature_debt.o obj/creature_attributes.o obj/creature_action.o obj/creature.o obj/cost_info.o obj/controller.o obj/content_id.o obj/content_factory.o obj/construction_map.o obj/color.o obj/collective_warning.o obj/collective_teams.o obj/collective_control.o obj/collective_config.o obj/collective_builder.o obj/collective_attack.o obj/collective.o obj/clock.o obj/campaign_menu_index.o obj/campaign_builder.o obj/campaign.o obj/build_info.o obj/buff_info.o obj/bucket_map.o obj/body_part.o obj/body.o obj/bed_type.o obj/avatar_info.o obj/avatar_index.o obj/audio_device.o obj/animation_id.o obj/animation.o obj/extern/lodepng.o -mwindows keeper32.res -lvorbisfile -lvorbis -logg -ltheoradec -lSDL2_image -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound -lpsapi -lgdiplus -lshlwapi -luuid -ldbghelp -lSDL2 -lSDL2main -lglu32 -lz -ljpeg -lopenal -lopengl32 -lcurl -limagehlp -lpthread -fuse-ld=lld collect2.exe: fatal error: cannot find 'ld' compilation terminated. make[1]: [Makefile-win:116: keeper] Error 1 make: [Makefile-win:100: all] Error 2

miki151 commented 1 year ago

I haven't built on msys2 for a while, maybe try removing -fuse-ld=lld from Makefile-win?