Page MenuHomeWildfire Games

FreeBSD patches
ClosedPublic

Authored by madpilot on Jan 19 2021, 10:05 AM.

Details

Summary

Based on work by Stan.

I have removed the HAVE_ICONV_CONST and ICONV_CONST=const flags which are unneeded, replacing them with LIBICONV_PLUG, which instructs FreeBSD iconv implementation to act as a plug in replacement for the gnu standalone implementation.

The -rdynamic flag is removed since it causes warnings.

I observed nvtt uses the wrong include for sse2, so I replaced it.

Please note that to make nvtt compile on FreeBSD on i386 (32 bit hardware), the -msse2 option is required to clang to enable the CPU features required by nvtt. I've been doing thiss via the ports framework.

Test Plan

Tested on my machine.

Further testing required by developers.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

madpilot created this revision.Jan 19 2021, 10:05 AM
Owners added a subscriber: Restricted Owners Package.Jan 19 2021, 10:06 AM
Stan added inline comments.Jan 19 2021, 10:09 AM
build/premake/extern_libs5.lua
365 ↗(On Diff #15509)

IIRC that forces linking the installed package rather than the libc one. Are you sure?

libraries/source/nvtt/src/src/nvmath/Half.cpp
494–498 ↗(On Diff #15509)

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/Cor

See https://jenkins.wildfiregames.com/job/macos-differential/2957/display/redirect for more details.

madpilot added inline comments.Jan 19 2021, 10:19 AM
build/premake/extern_libs5.lua
365 ↗(On Diff #15509)

This was in your patch, I did not modify that.

I tested this with poudriere, whcih build in a jail and there the iconv port is not installed (unless required, which I do not), so I guess this one forces linking to the port only if it is present.

But as I said I did not add this, but it worked when testing.

madpilot requested review of this revision.Jan 19 2021, 10:26 AM
Stan updated this revision to Diff 15520.Jan 19 2021, 2:06 PM

Try to recompile on the CI, to make sure we don't have side effects

Build is green

builderr-debug-macos.txt
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/CoreVideo.tbd and library file /System/Library/Frameworks//CoreVideo.framework/CoreVideo are out of sync. Falling back to library file for linking.
ld: warning: text-based stu

See https://jenkins.wildfiregames.com/job/macos-differential/2966/display/redirect for more details.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 19 2021, 5:59 PM
Closed by commit rP24704: Fixes FreeBSD build on 12.2 (authored by Stan). · Explain Why
This revision was automatically updated to reflect the committed changes.