Anonymous Login
2019-11-17 17:56 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000006OpenClonkEnginepublic2009-10-14 23:12
Reporterelmargol 
Assigned ToIsilkor 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
Product Version 
Target VersionFixed in Version 
Summary0000006: undefined reference to `__sync_fetch_and_add_4' can't compile on archlinux
Descriptiongcc 4.4.0
libc 2.10.1 i686 linux /archlinux


./configure 'CXX=g++ -std=gnu++0x' --with-gtk
......
make
make all-am
make[1]: Entering directory `/home/elmargol/src/mh/openclonk'
g++ -std=gnu++0x -std=gnu++0x -pthread -Wall -Wextra -Wno-invalid-offsetof -Wredundant-decls -Wendif-labels -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wsign-promo -Wunsafe-loop-optimizations -Wsign-promo -Wno-parentheses -Wno-unused-parameter -Wno-inline -Wno-reorder -Wno-float-equal -Wno-switch -Winvalid-pch -pipe -fpch-deps -g -O2 -o clonk engine/src/C4AList.o engine/src/C4Action.o engine/src/C4Application.o engine/src/C4Aul.o engine/src/C4AulExec.o engine/src/C4AulLink.o engine/src/C4AulParse.o engine/src/C4ChatDlg.o engine/src/C4Client.o engine/src/C4Command.o engine/src/C4ComponentHost.o engine/src/C4Config.o engine/src/C4Console.o engine/src/C4Control.o engine/src/C4Def.o engine/src/C4DefGraphics.o engine/src/C4DevmodeDlg.o engine/src/C4DownloadDlg.o engine/src/C4EditCursor.o engine/src/C4Effect.o engine/src/C4Extra.o engine/src/C4Facet.o engine/src/C4FacetEx.o engine/src/C4FindObject.o engine/src/C4FileMonitor.o engine/src/C4FileSelDlg.o engine/src/C4Folder.o engine/src/C4Fonts.o engine/src/C4FullScreen.o engine/src/C4Game.o engine/src/C4GameControl.o engine/src/C4GameControlNetwork.o engine/src/C4GameDialogs.o engine/src/C4GameLobby.o engine/src/C4GameMessage.o engine/src/C4GameObjects.o engine/src/C4GameOptions.o engine/src/C4GameOverDlg.o engine/src/C4GamePadCon.o engine/src/C4GameParameters.o engine/src/C4GameSave.o engine/src/C4GraphicsResource.o engine/src/C4GraphicsSystem.o engine/src/C4Group.o engine/src/C4GroupSet.o engine/src/C4Gui.o engine/src/C4GuiButton.o engine/src/C4GuiCheckBox.o engine/src/C4GuiComboBox.o engine/src/C4GuiContainers.o engine/src/C4GuiDialogs.o engine/src/C4GuiEdit.o engine/src/C4GuiLabels.o engine/src/C4GuiListBox.o engine/src/C4GuiMenu.o engine/src/C4GuiTabular.o engine/src/C4IDList.o engine/src/C4Id.o engine/src/C4InfoCore.o engine/src/C4InputValidation.o engine/src/C4InteractiveThread.o engine/src/C4KeyboardInput.o engine/src/C4Landscape.o engine/src/C4LangStringTable.o engine/src/C4Language.o engine/src/C4League.o engine/src/C4LoaderScreen.o engine/src/C4Log.o engine/src/C4LogBuf.o engine/src/C4MainMenu.o engine/src/C4Map.o engine/src/C4MapCreatorS2.o engine/src/C4MassMover.o engine/src/C4Material.o engine/src/C4MaterialList.o engine/src/C4Menu.o engine/src/C4MessageBoard.o engine/src/C4MessageInput.o engine/src/C4MouseControl.o engine/src/C4Movement.o engine/src/C4MusicFile.o engine/src/C4MusicSystem.o engine/src/C4NameList.o engine/src/C4NetIO.o engine/src/C4Network2.o engine/src/C4Network2Client.o engine/src/C4Network2Dialogs.o engine/src/C4Network2Discover.o engine/src/C4Network2IO.o engine/src/C4Network2IRC.o engine/src/C4Network2Players.o engine/src/C4Network2Reference.o engine/src/C4Network2Res.o engine/src/C4Network2ResDlg.o engine/src/C4Network2Stats.o engine/src/C4Object.o engine/src/C4ObjectCom.o engine/src/C4ObjectMenu.o engine/src/C4ObjectInfo.o engine/src/C4ObjectInfoList.o engine/src/C4ObjectList.o engine/src/C4ObjectListDlg.o engine/src/C4PXS.o engine/src/C4Packet2.o engine/src/C4Particles.o engine/src/C4PathFinder.o engine/src/C4Player.o engine/src/C4PlayerInfo.o engine/src/C4PlayerInfoConflicts.o engine/src/C4PlayerInfoListBox.o engine/src/C4PlayerList.o engine/src/C4PropertyDlg.o engine/src/C4Random.o engine/src/C4RankSystem.o engine/src/C4Record.o engine/src/C4Region.o engine/src/C4RTF.o engine/src/C4Scenario.o engine/src/C4Scoreboard.o engine/src/C4Script.o engine/src/C4ScriptHost.o engine/src/C4Sector.o engine/src/C4Shape.o engine/src/C4Sky.o engine/src/C4SolidMask.o engine/src/C4SoundSystem.o engine/src/C4Startup.o engine/src/C4StartupAboutDlg.o engine/src/C4StartupMainDlg.o engine/src/C4StartupNetDlg.o engine/src/C4StartupOptionsDlg.o engine/src/C4StartupPlrSelDlg.o engine/src/C4StartupScenSelDlg.o engine/src/C4Stat.o engine/src/C4StringTable.o engine/src/C4Surface.o engine/src/C4SurfaceFile.o engine/src/C4Teams.o engine/src/C4Texture.o engine/src/C4ToolsDlg.o engine/src/C4TransferZone.o engine/src/C4UpdateDlg.o engine/src/C4UpperBoard.o engine/src/C4Value.o engine/src/C4ValueList.o engine/src/C4ValueMap.o engine/src/C4Video.o engine/src/C4VideoPlayback.o engine/src/C4Viewport.o engine/src/C4Weather.o engine/src/C4WinMain.o engine/src/C4Wrappers.o engine/sec/C4ConfigShareware.o engine/sec/C4SecurityCertificates.o engine/src/C4RoundResults.o libstandard.a -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lfreetype -lz -lSDL_mixer -L/usr/lib -lSDL -lpthread -lGLEW -lGLU -lGL -lXrandr -lXxf86vm -lXpm -lX11 -lz -lpng -ljpeg -lcrypto
engine/src/C4StartupMainDlg.o: In function `__exchange_and_add':
/usr/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
engine/src/C4StartupScenSelDlg.o: In function `__exchange_and_add':
/usr/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
engine/src/C4StartupScenSelDlg.o:/usr/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ext/atomicity.h:46: more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [clonk] Fehler 1
make[1]: Leaving directory `/home/elmargol/src/mh/openclonk'
make: *** [all] Fehler 2
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000008

Isilkor (developer)

This sounds like configure selects the wrong target architecture for your machine. Can you post your CFLAGS (delete engine/src/C4AList.o and run make again; the first invocation of g++ should contain them, just paste that line) as well as the output of g++ -v?

As a workaround, you could try to run "./configure 'CXX=g++ -march=i686' && make clean all".

~0000009

elmargol (reporter)

Got a new GCC version from my distribution and it works now.

Please close this report
+Notes

-Issue History
Date Modified Username Field Change
2009-05-31 14:07 elmargol New Issue
2009-05-31 20:33 Isilkor Note Added: 0000008
2009-06-01 11:26 elmargol Note Added: 0000009
2009-06-01 13:21 Isilkor Status new => resolved
2009-06-01 13:21 Isilkor Resolution open => no change required
2009-06-01 13:21 Isilkor Assigned To => Isilkor
2009-10-14 23:12 Isilkor Status resolved => closed
+Issue History