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

Title: HP-UX 11i Build
Post by: rsaxvc on December 09, 2010, 11:56:48 pm
Am currently working on HP-UX build for FS2_open. The usual problems hit -

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.
Title: Re: HP-UX 11i Build
Post by: chief1983 on December 10, 2010, 12:08:13 am
Isn't the link order specified with the -L<library> command line args?
Title: Re: HP-UX 11i Build
Post by: rsaxvc on December 10, 2010, 09:18:52 pm
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.
Title: Re: HP-UX 11i Build
Post by: rsaxvc on December 10, 2010, 09:54:43 pm
Code: [Select]
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!
Title: Re: HP-UX 11i Build
Post by: chief1983 on December 11, 2010, 11:51:03 am
Can that be the line for all platforms?
Title: Re: HP-UX 11i Build
Post by: rsaxvc on December 11, 2010, 04:29:45 pm
No. Its full of things in /usr/local and /opt
Title: Re: HP-UX 11i Build
Post by: rsaxvc on December 11, 2010, 04:43:17 pm
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.
Title: Re: HP-UX 11i Build
Post by: chief1983 on December 11, 2010, 05:58:48 pm
Yeah since they're not terribly common on HP-UX, it's probably not a bad idea.
Title: Re: HP-UX 11i Build
Post by: rsaxvc on January 09, 2011, 11:00:32 pm
Currently, fs2_open is crashing on launch. It appears that the c++ constructors aren't running. Pretty odd.
Title: Re: HP-UX 11i Build
Post by: rsaxvc on January 12, 2011, 09:17:19 pm
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.
Title: Re: HP-UX 11i Build
Post by: chief1983 on January 12, 2011, 09:46:56 pm
Wasn't Solaris doing that too?
Title: Re: HP-UX 11i Build
Post by: rsaxvc on January 12, 2011, 11:42:39 pm
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.
Title: Re: HP-UX 11i Build
Post by: rsaxvc on January 15, 2011, 11:41:56 am
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.
Title: Re: HP-UX 11i Build
Post by: rsaxvc on January 15, 2011, 12:31:02 pm
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
Title: Re: HP-UX 11i Build
Post by: chief1983 on January 15, 2011, 03:09:51 pm
Huh.  Runtime error?  Wonder if that's our detection method or HP's drivers.
Title: Re: HP-UX 11i Build
Post by: The E on January 16, 2011, 06:46:41 am
Our detection method is calling glGetString(GL_VERSION), which is as standard an OpenGL API call as you can get.
Title: Re: HP-UX 11i Build
Post by: rsaxvc on January 16, 2011, 10:37:03 am
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.
Title: Re: HP-UX 11i Build
Post by: Iss Mneur on January 16, 2011, 11:10:38 am
Whats the problem with the commandline parsing?  I thought it was pretty standard C.
Title: Re: HP-UX 11i Build
Post by: rsaxvc on January 16, 2011, 10:55:43 pm
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.