dmd/druntime/phobos makefile horror
Alex Rønne Petersen
xtzgzorex at gmail.com
Fri Dec 16 07:26:24 PST 2011
On 16-12-2011 16:48, Trass3r wrote:
> I've always built my libs like that:
>
> cd druntime
> git pull -v
> make MODEL=64 -f posix.mak -j2
> make MODEL=32 -f posix.mak -j2
>
> cd ../phobos
> git pull -v
> make MODEL=64 -f posix.mak -j2 && mv
> generated/linux/release/64/libphobos2.a ../../linux/lib64
> make MODEL=32 -f posix.mak -j2 && mv
> generated/linux/release/32/libphobos2.a ../../linux/lib32
>
>
> Normally I don't need 32bit but now I tried to build an app which fails
> miserably with phobos2 not found.
> After removing -L--no-warn-search-mismatch and playing with 'ar x' and
> 'file' I finally found out 32bit libphobos contains the 64bit version of
> druntime.
Ahahaha! So that explains those weird linker errors I never figured out!
> The reason is druntime doesn't build separate libs like phobos does.
>
> This is just an example of the incoherence of the build system. (Another
> really bad one is dmd's makefile not allowing to specify debug/release
> while the windows version sort of does)
> Can't we get this straight once and for all?
I still wonder why druntime has to be in libphobos. It seems silly and
error-prone to me.
- Alex
More information about the Digitalmars-d
mailing list