D2 and FreeBSD

Marco Righele marco_righele at yahoo.it
Wed Aug 4 11:22:58 PDT 2010


On 08/04/10 12:30, Marco Righele wrote:

> Finally I was unable to compile phobos, as I encountered errors in
> different modules, including references to freebsd related files that
> aren't in the zip I downloaded.
> Am I supposed to use a different version of the compiler/libraries ?
> If so, is it publicly available ?
> 
> 


Silly me, the sources are on dsource.org :).
I downloaded the latest trunk of phobos, and tried to compile if

The compilation gave the following error:

> gmake -f posix.mak

std/math.d(1304): Error: shift by -48 is outside the range 0..32
std/math.d(1305): Error: template instance 'floatTraits!(real)' is not a
variable
std/math.d(1306): Error: template instance 'floatTraits!(real)' is not a
variable
gmake[1]: *** [generated/posix/release/libphobos2.a] Error 1
gmake: *** [release] Error 2


For the time being I just commented the offending function and completed
the compilation.

In the end I was able to obtain the executable and the libraries.
Configuring the paths to the imports of phobos and druntime in dmd.conf,
adapting the one provided in the binary package for linux

> cat /etc/dmd.conf

[Environment]
DFLAGS=-I/opt/phobos -I/opt/druntime/import -L -L/usr/lib

I'm able to compile an hello world, but not to link it

> dmd hello.d

/usr/bin/ld: : No such file: No such file or directory
collect2: ld returned 1 exit status
--- errorlevel 1

Given that others are using it without problems I think it's because I
made some mistakes somewhere, but where ? Any pointer to documentation
or mail on how to build it would be appreciated,

thanks,
Marco


More information about the Digitalmars-d mailing list