[RESOLVED][compil] pb with streflop

[RESOLVED][compil] pb with streflop

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
zyzy
Posts: 57
Joined: 27 Jan 2006, 22:40

[RESOLVED][compil] pb with streflop

Post by zyzy »

Hi,
i cant compil: linker problem with streflop
configuration:
win xp, mingw, last get in svn trunk : https://taspring.clan-sy.com/svn/spring/trunk/

Code: Select all

-Lrts\lib\streflop -Lmingwlibs\lib -LC:\Dev-Cpp\lib -LC:\Python24\libs -lopengl32 -lglu32 -lz -lfreetype -lopenal32 -lpython24 -lglew32 -lboost_threa
d-mt -lboost_regex-mt -lIL -lgdi32 -lwinmm -lwsock32 -lmingw32 -lSDLmain -lSDL -lstreflop
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lstreflop
collect2: ld returned 1 exit status
scons: *** [game\spring.exe] Error 1
Last edited by zyzy on 22 Sep 2006, 23:13, edited 1 time in total.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

You're missing some dependency but you'd just be wasting your time anyway, Spring doesn't work when compiled with MinGW.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

It does. At worst the compilation script is broken 8)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Really? I still get the Assertion Failed error.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Oh, that's that bug colorblind & you reported but which isn't reproducable here. I still need to make a patch for you or colorblind to hunt it down (unless you want to do me a favor and hunt it down yourself :P [by adding a bunch of assert(good_fpu_control_word()); to the sequence of commands ran before gamestart).

E: it's pretty easy to workaround tho - just look up the file/line where the assert is and comment it out.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: [compil] pb with streflop

Post by Tobi »

zyzy wrote:Hi,
i cant compil: linker problem with streflop
configuration:
win xp, mingw, last get in svn trunk : https://taspring.clan-sy.com/svn/spring/trunk/

Code: Select all

-Lrts\lib\streflop -Lmingwlibs\lib -LC:\Dev-Cpp\lib -LC:\Python24\libs -lopengl32 -lglu32 -lz -lfreetype -lopenal32 -lpython24 -lglew32 -lboost_threa
d-mt -lboost_regex-mt -lIL -lgdi32 -lwinmm -lwsock32 -lmingw32 -lSDLmain -lSDL -lstreflop
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lstreflop
collect2: ld returned 1 exit status
scons: *** [game\spring.exe] Error 1
Hm, I can't reproduce this here.

Have you tried a full rebuild?

Do you notice any errors (not warnings) in the first few minutes of the build (while streflop is building)?

Which files do exist in rts\lib\streflop?

Does a libstreflop.a or a streflop.a exist somewhere in your source checkout? (after a (failed) build of course)

Did you set the MINGDIR environment variable?
zyzy
Posts: 57
Joined: 27 Jan 2006, 22:40

Post by zyzy »

i have try a full rebuild.
I have delete spring, checkout, and compile 3 times ;)
Ihave MINGDIR: MINGDIR=C:\Dev-Cpp
just after checkout:

Code: Select all

FPUSettings.h
IntegerTypes.h
LGPL.txt
Makefile
Makefile.common
Makefile.libm_objects
Math.cpp
Math.h
README.txt
Random.cpp
Random.h
SoftFloatWrapper.cpp
SoftFloatWrapper.h
System.h
VERSION.txt
X87DenormalSquasher.h
arithmeticTest.cpp
cat.txt
libm
randomTest.cpp
softfloat
streflop.h
just after compil:

Code: Select all

FPUSettings.h
IntegerTypes.h
LGPL.txt
Makefile
Makefile.common
Makefile.libm_objects
Math.cpp
Math.h
Math.o
README.txt
Random.cpp
Random.h
Random.o
SoftFloatWrapper.cpp
SoftFloatWrapper.h
System.h
VERSION.txt
X87DenormalSquasher.h
arithmeticTest.cpp
libm
randomTest.cpp
softfloat
streflop.a
streflop.h
compil error:

Code: Select all

g++ -c -O3 -pipe -g -frename-registers -frounding-math -fsignaling-nans -fno-strict-aliasing -mieee-fp -Wall -mfpmath=387 -DSTREFLOP_X87=1 R
andom.cpp -o Random.o
Random.cpp:982: warning: alignment of 'streflop::DefaultRandomState' is greater than maximum object file alignment.  Using 16
and after streflop.a is create in the folder with size: 1,33Mo.
it is following by the linker message in the first post.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Code: Select all

streflop.a
rename this to

Code: Select all

libstreflop.a
and I think it will work.

Dont really have a clue why is isn't renamed automatically though.
zyzy
Posts: 57
Joined: 27 Jan 2006, 22:40

Post by zyzy »

ok, it seems to be ok, but i don't understand.
linder need -lstreflop and no -llibstreflop

but, i have another problem now :( (i hope it is this time a real problem ;) ):

Code: Select all

strip game\spring.exe
g++ -mwindows -shared -o omni\unitsync.dll build\tools\unitsync\pybind.o build\tools\unitsync\stdafx.o build\tools\unitsync\Syncer.o build\t
ools\unitsync\SyncServer.o build\tools\unitsync\unitsync.o rts\Rendering\Textures\Bitmap.o rts\Rendering\Textures\nv_dds.o rts\System\TdfPar
ser.o rts\System\FileSystem\Archive7Zip.o rts\System\FileSystem\ArchiveBuffered.o rts\System\FileSystem\ArchiveDir.o rts\System\FileSystem\A
rchiveFactory.o rts\System\FileSystem\ArchiveHPI.o rts\System\FileSystem\ArchiveScanner.o rts\System\FileSystem\ArchiveZip.o rts\System\File
System\FileHandler.o rts\System\FileSystem\VFSHandler.o rts\System\Platform\FileSystem.o rts\lib\7zip\7zAlloc.o rts\lib\7zip\7zBuffer.o rts\
lib\7zip\7zCrc.o rts\lib\7zip\7zDecode.o rts\lib\7zip\7zExtract.o rts\lib\7zip\7zHeader.o rts\lib\7zip\7zIn.o rts\lib\7zip\7zItem.o rts\lib\
7zip\7zMethodID.o rts\lib\7zip\LzmaDecode.o rts\lib\hpiutil2\hpientry.o rts\lib\hpiutil2\hpifile.o rts\lib\hpiutil2\hpiutil.o rts\lib\hpiuti
l2\scrambledfile.o rts\lib\hpiutil2\sqshstream.o rts\lib\hpiutil2\substream.o rts\lib\minizip\ioapi.o rts\lib\minizip\unzip.o rts\lib\minizi
p\zip.o rts\lib\minizip\iowin32.o rts\System\Platform\Win\WinFileSystemHandler.o -Lrts\lib\streflop -Lmingwlibs\lib -LC:\Dev-Cpp\lib -LC:\Py
thon24\libs -lopengl32 -lglu32 -lz -lfreetype -lopenal32 -lpython24 -lglew32 -lboost_thread-mt -lboost_regex-mt -lIL -lgdi32 -lwinmm -lwsock
32 -lmingw32 -lSDLmain -lSDL -lstreflop -Wl,--out-implib,omni\unitsync.a -Wl,--output-def,omni\unitsync.def
Info: resolving ___GLEW_ARB_texture_non_power_of_two by linking to __imp____GLEW_ARB_texture_non_power_of_two (auto-import)
Creating library file: omni\unitsync.a
build\tools\unitsync\unitsync.o(.text+0x9a):unitsync.cpp: undefined reference to `ConfigHandler::Deallocate()'
build\tools\unitsync\unitsync.o(.text+0xbb):unitsync.cpp: undefined reference to `ConfigHandler::Deallocate()'
rts\System\Platform\FileSystem.o(.text+0x43c):FileSystem.cpp: undefined reference to `ConfigHandler::GetInstance()'
collect2: ld returned 1 exit status
zyzy
Posts: 57
Joined: 27 Jan 2006, 22:40

Post by zyzy »

Code: Select all

-llibrary
-l library
    Search the library named library when linking. (The second alternative with the library as a separate argument is only for POSIX compliance and is not recommended.)

    It makes a difference where in the command you write this option; the linker searches and processes libraries and object files in the order they are specified. Thus, `foo.o -lz bar.o' searches library `z' after file foo.o but before bar.o. If bar.o refers to functions in `z', those functions may not be loaded.

    The linker searches a standard list of directories for the library, which is actually a file named liblibrary.a. The linker then uses this file as if it had been specified precisely by name. 
i understand now ;)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

update your svn checkout & try again, the above bug has already been fixed I think
zyzy
Posts: 57
Joined: 27 Jan 2006, 22:40

Post by zyzy »

it ok after update..
I can compil now..

thanks for your help tobi...
Post Reply

Return to “Engine”