Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: rsaxvc on December 09, 2010, 11:56:48 pm
-
Am currently working on HP-UX build for FS2_open. The usual problems hit -
- optimized powerpc code leaking into the build
- differing includes for certain IOCTRLS
- lack of libraries
- no hp-ux enum in the build system
Currently, after building lua, openal, and theora, fs2 compiles, but does not link. The HP-UX linker I have requires library order to be supplied so that it never has to parse a library a second time. Once that is fixed, I'll start testing it.
-
Isn't the link order specified with the -L<library> command line args?
-
They are specified, but it looks like HP-UX will need a custom linker line, because it has a 1-pass linker, all libraries have to be ordered as the dependency tree traversal.
-
ld -o fs2_open freespace.o levelpaging.o libcode.a /usr/local/lib/libopenal.sl /usr/local/lib/liblua.a /usr/local/lib/libjpeg.sl /usr/local/lib/libSDL.sl /usr/local/lib/libSDL_image.sl /usr/local/lib/libvorbis.sl /usr/local/lib/libvorbisfile.sl /usr/local/lib/libtheora.sl /usr/local/lib/libtheoradec.sl /usr/local/lib/libtheoraenc.sl /opt/graphics/OpenGL/lib/libGL.sl /opt/graphics/OpenGL/lib/libGLU.sl /opt/hp-gcc-4.4.3/lib/libstdc++.sl /opt/hp-gcc-4.4.3/lib/libgcc_s.sl /opt/langtools/lib/crt0.o
TaDa!
-
Can that be the line for all platforms?
-
No. Its full of things in /usr/local and /opt
-
Maybe this is a situation for a statically linked build. If we want to distribute an HP-UX build, I'd hate to have to tell people how to build all the libraries I had to compile.
For the most part you can use hpux.connect.org.uk though.
-
Yeah since they're not terribly common on HP-UX, it's probably not a bad idea.
-
Currently, fs2_open is crashing on launch. It appears that the c++ constructors aren't running. Pretty odd.
-
Interesting. It appears my linker needed to be patched. The default HP-UX 11.11 linker doesn't appear to support dynamic linkage execution properly. After patching that, I'm asserting in OpenAL.
-
Wasn't Solaris doing that too?
-
I found the assert is when locking a mutex. It appears to be erroring out instead of locking properly. However, at some point I lost the ability to build it again.
-
Right, figured out the linker issue, looks like multiple objects in the system LD path. For now, I've copied them into the build directory.
Also, it turns out the hpux.connect.org.uk version of SDL is built without OpenGL support...bummer. I guess I'll go build SDL now.
-
Now working on ERROR: "Current GL Version of 0.0 is less than the required version of 1.2. Switch video modes or update your drivers." at graphics/gropengl.cpp:1869
-
Huh. Runtime error? Wonder if that's our detection method or HP's drivers.
-
Our detection method is calling glGetString(GL_VERSION), which is as standard an OpenGL API call as you can get.
-
I had accidentally linked in MESA and HP-GL, so no clue what that meant. Linking in either one let me continue. Now I'm stuck in the code handling command-line parsing.
-
Whats the problem with the commandline parsing? I thought it was pretty standard C.
-
Don't know yet. Originally it was crashing because the constructors hadn't run. Thankfully there was an init variable to tell me something was up. It appears to be in an infinite loop, I suspect in the list of flags.