#1938 closed defect (fixed)
[PATCH] Fix build failure with boost 1.53
Reported by: | Vincent Cheng | Owned by: | leper |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 14 |
Component: | Build & Packages | Keywords: | patch |
Cc: | vincentc1208@… | Patch: |
Description
0 A.D. currently fails to build on Debian/Ubuntu with boost 1.53 (also filed as Debian bug #709570). Please consider applying the following patch to fix this.
--- a/build/premake/extern_libs4.lua +++ b/build/premake/extern_libs4.lua @@ -242,7 +242,7 @@ -- The following are not strictly link dependencies on all systems, but -- are included for compatibility with different versions of Boost android_names = { "boost_filesystem-gcc-mt", "boost_system-gcc-mt" }, - unix_names = { "boost_filesystem-mt", "boost_system-mt" }, + unix_names = { "boost_filesystem", "boost_system" }, bsd_names = { "boost_filesystem", "boost_system" }, }) end, @@ -251,7 +251,7 @@ link_settings = function() add_default_links({ android_names = { "boost_signals-gcc-mt" }, - unix_names = { "boost_signals-mt" }, + unix_names = { "boost_signals" }, bsd_names = { "boost_signals" }, }) end,
Attachments (2)
Change History (11)
comment:1 by , 11 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 14 |
Summary: | Fix build failure with boost 1.53 → [PATCH] Fix build failure with boost 1.53 |
comment:2 by , 11 years ago
follow-up: 5 comment:3 by , 11 years ago
Things like this should be handled by the build system, so I think we should fix this ;)
I think its not related to the boost version, so we need to check if the -mt library exists and then decide to which we try to link.
premake has a function os.findlib that I tried. It kind of worked but leper noted that the function included in the currently used premake has some features missing. It will try to lookup /etc/ld.so.conf for possible locations, but will not honour "include". At least OpenBSD does not even have this file but a binary equivalent. (Needs to call ldconfig to get a useable output.)
So we would need to insert our own findlib (use stable head... or at least that function).
by , 11 years ago
Attachment: | possible-fix-for-boost-with-and-without-mt.patch added |
---|
use (working!) findlib to decide if -mt library exists and should be used
comment:5 by , 11 years ago
Replying to Markus:
premake has a function os.findlib that I tried.
Nice! I didn't know that existed, maybe it would come in handy for some of our other libs.
It may be time to consider upgrading Premake. As it stands, we haven't introduced too many differences from the original 4.3 import in r9828. It wouldn't be the most fun task in the world, but we could go through and verify each change is still needed or has been fixed upstream, then upgrade to premake-stable. It takes A LOT of testing, each OS and compiler we support with and without PCH, and the tests must still compile and work. Off hand, the only other thing I know we would gain is VS2012 support which was added recently.
comment:6 by , 11 years ago
os.findlib works after a small change on OpenBSD too (in parse_ld_so_conf() add
local file = io.open("/etc/ld.so.conf") if file == nil then return dict end
before the io.lines() call and replace the parameter/filename in that call with file. Also your patch misses the addition of os._is64bit().
I agree that upgrading premake to premake-stable (or what will hopefully become 4.4 in the future) wouldn't be the worst decision to be made.
Also see #1518 related to upgrading/differences from 4.3.
by , 11 years ago
Attachment: | update-premake-findlib.patch added |
---|
update os.findlib (slightly modified premake head)
IMO this will have to be patched on a per-distro basis, it's already listed as a known problem in build instructions for Slackware. Unfortunately fixing it for you will break it for others. (A situation where it would be nice to have a more robust build system like CMake, but that's a lot of work)