Opened 12 years ago

Last modified 12 years ago

#1463 closed defect

Add support for OpenBSD — at Version 10

Reported by: Anthony J. Bentley Owned by:
Priority: Nice to Have Milestone: Alpha 11
Component: Build & Packages Keywords:
Cc: Patch:

Description (last modified by leper)

Make these libraries compile on OpenBSD and fix all remaining issues.

FCollada r11936
nvtt upstream bug report
SpiderMonkey (probably needs --disable-tracejit)

Change History (12)

by Anthony J. Bentley, 12 years ago

Attachment: 0ad-openbsd-build.txt added

Full build log

comment:1 by Anthony J. Bentley, 12 years ago

I should probably add that this is on amd64.

comment:2 by historic_bruno, 12 years ago

You probably need to search for __FreeBSD__ in all the FCollada source files and add a check for __OpenBSD__ as well. I don't know if that will fix this particular error but it's likely required for a successful build.

Last edited 12 years ago by historic_bruno (previous) (diff)

comment:3 by Anthony J. Bentley, 12 years ago

You're right, it doesn't fix this particular error, but I'll attach the patch anyway. Initial problem is still present.

by Anthony J. Bentley, 12 years ago

Attachment: openbsd-fcollada.diff added

Patch that adds OpenBSD to #ifdefs.

comment:4 by historic_bruno, 12 years ago

In FCollada/FUtils/FUStringBuilder.h, change line 138 to:

#elif defined(__APPLE__) || defined(__OpenBSD__)

which makes sense if it works, since OS X builds on BSD in many respects (not sure why this fix isn't required on FreeBSD as well...)

comment:5 by Anthony J. Bentley, 12 years ago

That fix (combined with the patch I attached above) allows FCollada to build on OpenBSD. Thanks.

comment:6 by historic_bruno, 12 years ago

Good to hear :) How does the rest of the build go? If that's all we need, I'll commit the fixes.

comment:7 by Kieran P, 12 years ago

Keywords: patch review added
Milestone: BacklogAlpha 11
Priority: Should HaveNice to Have
Summary: error: call of overloaded 'append(const long unsigned int&)' is ambiguous[PATCH] error: call of overloaded 'append(const long unsigned int&)' is ambiguous

comment:8 by Anthony J. Bentley, 12 years ago

Spidermonkey won't configure unless I pass --disable-tracejit to it. When that's done, the build fails here:

c++ -o jsnativestack.o -c  -I./dist/system_wrappers_js -include ../config/gcc_hidden.h -DOSTYPE=\"OpenBSD5\" -DOSARCH=OpenBSD -DEXPORT_JS_API -D__STDC_LIMIT_MACROS  -I.. -I. -I./dist/include -I./dist/include/nsprpub     -I.. -I../assembler -I../yarr  -fPIC  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -fno-strict-aliasing -pthread -pipe  -DDEBUG -D_DEBUG -DTRACING -g -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/jsnativestack.pp ../jsnativestack.cpp
../jsnativestack.cpp: In function 'void* js::GetNativeStackBaseImpl()':
../jsnativestack.cpp:207: error: 'pthread_getattr_np' was not declared in this scope
gmake[1]: *** [jsnativestack.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: Leaving directory

I currently tell 0ad to use the system spidermonkey (1.9.2.16). No doubt this will cause errors later on down the line.

nvtt doesn't build either. I opened a bug upstream: https://code.google.com/p/nvidia-texture-tools/issues/detail?id=176

comment:9 by leper, 12 years ago

In 11936:

Make FCollada compile on OpenBSD, based on patch by anthonyjbentley. Refs #1463.

comment:10 by leper, 12 years ago

Description: modified (diff)
Keywords: patch review removed
Summary: [PATCH] error: call of overloaded 'append(const long unsigned int&)' is ambiguousAdd support for OpenBSD

Thanks for the patch. I modified the ticket to add support for OpenBSD. I'll probably give the remaining issues a try in the next days, but if you have some other patches just add them here.

Note: See TracTickets for help on using tickets.