<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks to everyone for the help and advice on choosing a build tool
for my D+LLVM project. I settled on Jam (ftjam) in the end, the
major factor being cross-platform support and prebuilt binaries for
a variety of operating systems.<br>
<br>
The documentation for Jam I've found is very lacking but have
struggled to put together a working build script. My Jamfile looks
like this so far:<br>
<br>
<hr size="2" width="100%"><i>CC = dmd ;<br>
CCFLAGS = -fPIC -O -inline -release -w ;<br>
DFILES =<br>
src/main.d ; # should be scanned from src dir<br>
LINK = $(CC) ;<br>
LINKFLAGS = -L-lstdc++ -L-ldl ;<br>
<br>
C++ = g++ ;<br>
C++FLAGS =<br>
-I/usr/include<br>
-DNDEBUG<br>
-D_GNU_SOURCE<br>
-D__STDC_LIMIT_MACROS<br>
-D__STDC_CONSTANT_MACROS<br>
-O3<br>
-fomit-frame-pointer<br>
-fno-exceptions<br>
-fPIC<br>
-Woverloaded-virtual<br>
-Wcast-qual ; # should be generated from `llvm-config
--cxxflags`<br>
<br>
# override the Link action to correct for the dmd compiler -o flag<br>
actions Link bind NEEDLIBS {<br>
$(LINK) $(LINKFLAGS) -of$(<) $(UNDEFS) $(>) $(NEEDLIBS)
$(LINKLIBS)<br>
}<br>
<br>
Objects $(DFILES) ;<br>
MainFromObjects puckc : $(DFILES:S=.o) ;<br>
LinkLibraries puckc : libllvmd ;<br>
Library libllvmd : libs/llvm-2.9/Ext.cpp libs/llvm-2.9/Target.cpp
;</i><br>
<hr size="2" width="100%"><br>
I'm not very experienced dealing with linker errors, the build
output shows these errors:<br>
<br>
...found 152 target(s)...<br>
...updating 5 target(s)...<br>
C++ libs/llvm-2.9/Ext.o <br>
C++ libs/llvm-2.9/Target.o <br>
Archive libllvmd.a <br>
ar: creating libllvmd.a<br>
Ranlib libllvmd.a <br>
Dc src/main.o <br>
Link puckc <br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(gcx_3d4_122.o):
In function `_D2gc3gcx3Gcx4markMFPvPvZv':<br>
src/gc/gcx.d:(.text._D2gc3gcx3Gcx4markMFPvPvZv+0x165): undefined
reference to `_D4core5bitop3btsFNbPmmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(gcx_3d4_122.o):
In function `_D2gc3gcx3Gcx11fullcollectMFPvZm':<br>
src/gc/gcx.d:(.text._D2gc3gcx3Gcx11fullcollectMFPvZm+0x3e4):
undefined reference to `_D4core5bitop3bsfFNaNbmZi'<br>
src/gc/gcx.d:(.text._D2gc3gcx3Gcx11fullcollectMFPvZm+0x47f):
undefined reference to `_D4core5bitop3bsfFNaNbmZi'<br>
src/gc/gcx.d:(.text._D2gc3gcx3Gcx11fullcollectMFPvZm+0x596):
undefined reference to `_D4core5bitop3btrFNbPmmZi'<br>
src/gc/gcx.d:(.text._D2gc3gcx3Gcx11fullcollectMFPvZm+0x792):
undefined reference to `_D4core5bitop3btrFNbPmmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(lifetime_5c0_478.o):
In function `_D2rt8lifetime11newCapacityFmmZm':<br>
src/rt/lifetime.d:(.text._D2rt8lifetime11newCapacityFmmZm+0x3a):
undefined reference to `_D4core5bitop3bsrFNaNbmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(gcbits_3c0_21c.o):
In function `_D2gc6gcbits6GCBits9testClearMFmZm':<br>
src/gc/gcbits.d:(.text._D2gc6gcbits6GCBits9testClearMFmZm+0x18):
undefined reference to `_D4core5bitop3btrFNbPmmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(gcbits_3c0_21c.o):
In function `_D2gc6gcbits6GCBits7testSetMFmZm':<br>
src/gc/gcbits.d:(.text._D2gc6gcbits6GCBits7testSetMFmZm+0x18):
undefined reference to `_D4core5bitop3btsFNbPmmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(array_13b_5f7.o):
In function
`_D3std5array16__T8AppenderTAaZ8Appender11newCapacityFmZm':<br>
std/array.d:(.text._D3std5array16__T8AppenderTAaZ8Appender11newCapacityFmZm+0x1a):
undefined reference to `_D4core5bitop3bsrFNaNbmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(bitmanip_18c_31e.o):
In function `_D3std8bitmanip8BitArray7opIndexMxFmZb':<br>
std/bitmanip.d:(.text._D3std8bitmanip8BitArray7opIndexMxFmZb+0x15):
undefined reference to `_D4core5bitop2btFNaNbxPmmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(bitmanip_18c_31e.o):
In function `_D3std8bitmanip8BitArray13opIndexAssignMFbmZb':<br>
std/bitmanip.d:(.text._D3std8bitmanip8BitArray13opIndexAssignMFbmZb+0x1f):
undefined reference to `_D4core5bitop3btsFNbPmmZi'<br>
std/bitmanip.d:(.text._D3std8bitmanip8BitArray13opIndexAssignMFbmZb+0x2e):
undefined reference to `_D4core5bitop3btrFNbPmmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(array_76d_638.o):
In function
`_D3std5array17__T8AppenderTAyaZ8Appender11newCapacityFmZm':<br>
std/array.d:(.text._D3std5array17__T8AppenderTAyaZ8Appender11newCapacityFmZm+0x1a):
undefined reference to `_D4core5bitop3bsrFNaNbmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(numeric_86a_120.o):
In function `_D3std7numeric3Fft6__ctorMFAfZC3std7numeric3Fft':<br>
std/numeric.d:(.text._D3std7numeric3Fft6__ctorMFAfZC3std7numeric3Fft+0x5f):
undefined reference to `_D4core5bitop3bsfFNaNbmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(numeric_86c_4d8.o):
In function `_D3std7numeric12isPowerOfTwoFmZb':<br>
std/numeric.d:(.text._D3std7numeric12isPowerOfTwoFmZb+0xd):
undefined reference to `_D4core5bitop3bsrFNaNbmZi'<br>
std/numeric.d:(.text._D3std7numeric12isPowerOfTwoFmZb+0x1b):
undefined reference to `_D4core5bitop3bsfFNaNbmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(numeric_872_5ab.o):
In function `_D3std7numeric14__T6StrideTAfZ6Stride6nStepsMFNdmZm':<br>
std/numeric.d:(.text._D3std7numeric14__T6StrideTAfZ6Stride6nStepsMFNdmZm+0x2a):
undefined reference to `_D4core5bitop3bsfFNaNbmZi'<br>
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/libphobos2.a(array_162_6f0.o):
In function
`_D3std5array18__T8AppenderTAAyaZ8Appender11newCapacityFmZm':<br>
std/array.d:(.text._D3std5array18__T8AppenderTAAyaZ8Appender11newCapacityFmZm+0x1e):
undefined reference to `_D4core5bitop3bsrFNaNbmZi'<br>
collect2: ld returned 1 exit status<br>
--- errorlevel 1<br>
<br>
dmd -L-lstdc++ -L-ldl -ofpuckc src/main.o libllvmd.a <br>
<br>
...failed Link puckc ...<br>
...failed updating 1 target(s)...<br>
...updated 4 target(s)...<br>
<br>
Anyone got any experience using Jam or advice and help on solving
the link errors.<br>
<br>
Cheers,<br>
<br>
Chris<br>
<br>
<br>
On 13/05/11 18:38, Chris Molozian wrote:
<blockquote cite="mid:4DCD6C8F.1030505@cmoz.me" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hey All,<br>
<br>
This is my first post to the mailing list, I'm an avid follower of
D's development and am currently using it to develop a compiler
for my thesis work. One of the goals of this stage of the
development work is to provide a simple build environment to
compile the codebase on Linux, Windows and Mac OS X. The only
complex aspects of the build process is compiling the LLVM-D
bindings and linking to LLVM.<br>
<br>
I'm evaluating build tools for this purpose and have concluded
(correct me if I'm wrong) that the D-orientated build tools: <a
moz-do-not-send="true"
href="http://www.dsource.org/projects/build">Bud</a> and <a
moz-do-not-send="true"
href="http://www.dsource.org/projects/dsss">DSSS</a> are
abandoned. I'm not sure whether development on <a
moz-do-not-send="true"
href="https://bitbucket.org/h3r3tic/xfbuild/overview">xfBuild</a>
is still going on.<br>
<br>
I'd like to use a tool that is easy for testers to install on
their system (preferably pre-built binaries are available) and use
to compile my work. I've been looking at C/C++ build tools and
have narrowed it down to these:<br>
<ul>
<li><a moz-do-not-send="true"
href="http://www.freetype.org/jam/index.html">Jam (ftjam)</a>,
cross-platform and platform independent build language. Lots
of variants with the same name, therefore finding it hard to
find good tutorials and documentation.</li>
<li><a moz-do-not-send="true"
href="http://www.boost.org/boost-build2/">Boost.Build (bjam)</a>,
not sure how it differs to ftjam.</li>
<li><a moz-do-not-send="true"
href="http://miller.emu.id.au/pmiller/software/cook/">Cook</a>,
can't find whether it can be built for use on Windows. No
pre-built Windows binary. Very extensive documentation,
although I think the default build file name is silly
"Howto.cook" <span class="moz-smiley-s1"><span> :-) </span></span>.</li>
</ul>
After all this preamble I guess what I'm asking is... what (if
any) cross-platform build tools does everyone use with their D
projects? Any feedback on experiences with any of the build tools
I've mentioned is also greatly appreciated. If you can suggest any
alternatives, please do.<br>
<br>
If you've read this far, thanks for taking the time to read it <span
class="moz-smiley-s1"><span> :-) </span></span> and sorry for
the long message.<br>
<br>
Cheers,<br>
<br>
Chris<br>
<br>
PS: I've seen the <a moz-do-not-send="true"
href="http://www.dsource.org/projects/cmaked">CMakeD</a> module,
I know a lot of people recommend CMake for cross-platform builds
and that the KDE guys use it. I have tried to like it... but
settled on hating it. The procedural language is daft and ugly and
I loathe the CMakeLists.txt file that goes in each directory. I've
already ruled it out.<br>
<br>
</blockquote>
</body>
</html>