Jump to page: 1 2
Thread overview
dmd.conf... again
Aug 12, 2015
Atila Neves
Aug 12, 2015
Rikki Cattermole
Aug 12, 2015
Atila Neves
Aug 12, 2015
Dicebot
Aug 12, 2015
Atila Neves
Aug 12, 2015
Dicebot
Aug 12, 2015
Adam D. Ruppe
Aug 12, 2015
Atila Neves
Aug 12, 2015
wobbles
Aug 12, 2015
Atila Neves
Aug 12, 2015
wobbles
Aug 12, 2015
Atila Neves
Aug 12, 2015
Adam D. Ruppe
Aug 12, 2015
Ali Çehreli
Aug 12, 2015
Atila Neves
Aug 12, 2015
Adam D. Ruppe
August 12, 2015
I'm trying to use dmd on a VM where I don't have root privileges (don't ask). I can't copy dmd.conf to /etc. According to the docs, I should be able to use a dmd.conf that's in the same dir as dmd itself, or in my home directory, or even specifying -conf=. None of these seems to tell dmd where to find phobos.

I've also tried setting DFLAGS myself, but under no circumstances is dmd passing the -L where phobos is to ld, so I can compile but not link (well, I can if I use gcc!). Also tried dmd -L-L/path/to/phobos.

Does anyone have a clue why this doesn't work? My dmd.conf looks like this:

[Environment]
DFLAGS=-I/nobackup/dlang/phobos/ -I/nobackup/dlang/druntime/import -L-L/nobackup/dlang/download/dmd2/linux/lib64

Atila
August 12, 2015
On 13/08/2015 12:16 a.m., Atila Neves wrote:
> I'm trying to use dmd on a VM where I don't have root privileges (don't
> ask). I can't copy dmd.conf to /etc. According to the docs, I should be
> able to use a dmd.conf that's in the same dir as dmd itself, or in my
> home directory, or even specifying -conf=. None of these seems to tell
> dmd where to find phobos.
>
> I've also tried setting DFLAGS myself, but under no circumstances is dmd
> passing the -L where phobos is to ld, so I can compile but not link
> (well, I can if I use gcc!). Also tried dmd -L-L/path/to/phobos.
>
> Does anyone have a clue why this doesn't work? My dmd.conf looks like this:
>
> [Environment]
> DFLAGS=-I/nobackup/dlang/phobos/ -I/nobackup/dlang/druntime/import
> -L-L/nobackup/dlang/download/dmd2/linux/lib64
>
> Atila

Perhaps this small snippet from my Windows install might shred some light. Specifically the LIB property.

[Environment32]
LIB="%@P%\..\lib"
LINKCMD=%@P%\link.exe


[Environment64]
LIB="%@P%\..\lib64"
August 12, 2015
More info about what gets placed where please.

I have special dev layout on my system that co-exists with system-wide installation of dmd. It is as simple as having ~/dlang/{dmd|druntime|phobos}, linking ~/dlang/dmd/src/dmd to ~/bin/dmd-dev and placing dmd.conf in ~/bin which adds all those paths as -I and -L flags. Works just fine.


August 12, 2015
On Wednesday, 12 August 2015 at 12:16:50 UTC, Atila Neves wrote:
> I'm trying to use dmd on a VM where I don't have root privileges (don't ask). I can't copy dmd.conf to /etc. According to the docs, I should be able to use a dmd.conf that's in the same dir as dmd itself, or in my home directory, or even specifying -conf=. None of these seems to tell dmd where to find phobos.
>
> I've also tried setting DFLAGS myself, but under no circumstances is dmd passing the -L where phobos is to ld, so I can compile but not link (well, I can if I use gcc!). Also tried dmd -L-L/path/to/phobos.
>
> Does anyone have a clue why this doesn't work? My dmd.conf looks like this:
>
> [Environment]
> DFLAGS=-I/nobackup/dlang/phobos/ -I/nobackup/dlang/druntime/import -L-L/nobackup/dlang/download/dmd2/linux/lib64
>
> Atila

Hmm, for me the dmd zip works out of the box. Unzip, add ...dmd2/linux/bin64 to PATH. Done.

(The following is a stupid workaround that may be employed for libs that don't follow the normal naming convention. Phobos shouldn't be one of them but...)
But lets say you want to force it to link to a specific lib that is in a lookup path you could use the full filename: -L-l:libphobos2.so
August 12, 2015
On Wednesday, 12 August 2015 at 12:16:50 UTC, Atila Neves wrote:
> I'm trying to use dmd on a VM where I don't have root privileges (don't ask). I can't copy dmd.conf to /etc.

If you use the dmd zip, everything just works when you just unzip it and use it all in-place. No need to move or copy files anywhere, no need for root.

August 12, 2015
On Wednesday, 12 August 2015 at 12:40:49 UTC, Adam D. Ruppe wrote:
> On Wednesday, 12 August 2015 at 12:16:50 UTC, Atila Neves wrote:
>> I'm trying to use dmd on a VM where I don't have root privileges (don't ask). I can't copy dmd.conf to /etc.
>
> If you use the dmd zip, everything just works when you just unzip it and use it all in-place. No need to move or copy files anywhere, no need for root.

I downloaded the zip, added linux/bin64 to PATH, tried compiling a hello world and got:

usr/bin/ld: cannot find -l:libphobos2.a

That's when I started trying to set the configuration but nothing seems to work.

Atila
August 12, 2015
On Wednesday, 12 August 2015 at 12:29:46 UTC, Dicebot wrote:
> More info about what gets placed where please.
>
> I have special dev layout on my system that co-exists with system-wide installation of dmd. It is as simple as having ~/dlang/{dmd|druntime|phobos}, linking ~/dlang/dmd/src/dmd to ~/bin/dmd-dev and placing dmd.conf in ~/bin which adds all those paths as -I and -L flags. Works just fine.

There's no system-wide installation (since I don't have root), I just downloaded the zip for 2.068 and added dmd2/linux/bin64 to my PATH.

Atila
August 12, 2015
On Wednesday, 12 August 2015 at 13:04:25 UTC, Atila Neves wrote:
> On Wednesday, 12 August 2015 at 12:29:46 UTC, Dicebot wrote:
>> More info about what gets placed where please.
>>
>> I have special dev layout on my system that co-exists with system-wide installation of dmd. It is as simple as having ~/dlang/{dmd|druntime|phobos}, linking ~/dlang/dmd/src/dmd to ~/bin/dmd-dev and placing dmd.conf in ~/bin which adds all those paths as -I and -L flags. Works just fine.
>
> There's no system-wide installation (since I don't have root), I just downloaded the zip for 2.068 and added dmd2/linux/bin64 to my PATH.
>
> Atila

Yeah I have meant that it works _even_ if you also have system-wide installation. No idea what dmd.conf they put into zip - I never use it.
August 12, 2015
On Wednesday, 12 August 2015 at 13:00:45 UTC, Atila Neves wrote:
> On Wednesday, 12 August 2015 at 12:40:49 UTC, Adam D. Ruppe wrote:
>> On Wednesday, 12 August 2015 at 12:16:50 UTC, Atila Neves wrote:
>>> I'm trying to use dmd on a VM where I don't have root privileges (don't ask). I can't copy dmd.conf to /etc.
>>
>> If you use the dmd zip, everything just works when you just unzip it and use it all in-place. No need to move or copy files anywhere, no need for root.
>
> I downloaded the zip, added linux/bin64 to PATH, tried compiling a hello world and got:
>
> usr/bin/ld: cannot find -l:libphobos2.a
>
> That's when I started trying to set the configuration but nothing seems to work.
>
> Atila

Have you run dmd from the directory you unzipped it to?
libphobos2.a is in there I think, so ld wouldn't be able to find it.
August 12, 2015
On Wednesday, 12 August 2015 at 13:46:24 UTC, wobbles wrote:
> On Wednesday, 12 August 2015 at 13:00:45 UTC, Atila Neves wrote:
>> On Wednesday, 12 August 2015 at 12:40:49 UTC, Adam D. Ruppe wrote:
>>> On Wednesday, 12 August 2015 at 12:16:50 UTC, Atila Neves wrote:
>>>> [...]
>>>
>>> If you use the dmd zip, everything just works when you just unzip it and use it all in-place. No need to move or copy files anywhere, no need for root.
>>
>> I downloaded the zip, added linux/bin64 to PATH, tried compiling a hello world and got:
>>
>> usr/bin/ld: cannot find -l:libphobos2.a
>>
>> That's when I started trying to set the configuration but nothing seems to work.
>>
>> Atila
>
> Have you run dmd from the directory you unzipped it to?
> libphobos2.a is in there I think, so ld wouldn't be able to find it.

Just did, didn't work. Tried it from lib64 and lib32 as well, nothing.

Atila
« First   ‹ Prev
1 2