RejectedSoftware Forums

Sign up

Pages: 1 2

Build issue

With DMD, vibe.d and DUB at master, I get the following build warnings when running ./build.sh to build DUB, and everything stops:

Running dmd...
source/dub/installation.d(34): Warning: const field with initializer should be static, gshared, or an enum<br>source/dub/internal/vibecompat/core/file.d(93): Warning: explicit element-wise assignment templ[16LU..dollar - 1LU] = (suffix)[] is better than templ[16LU..__dollar - 1LU] = suffix

Re: Build issue

Am 28.05.2013 20:39, schrieb Øivind Loe:

With DMD, vibe.d and DUB at master, I get the following build warnings when running ./build.sh to build DUB, and everything stops:

Running dmd...
source/dub/installation.d(34): Warning: const field with initializer should be static, gshared, or an enum<br>source/dub/internal/vibecompat/core/file.d(93): Warning: explicit element-wise assignment templ[16LU..dollar - 1LU] = (suffix)[] is better than templ[16LU..__dollar - 1LU] = suffix

Should work for dub master now.

Re: Build issue

On Tue, 28 May 2013 23:31:01 +0200, Sönke Ludwig wrote:

Am 28.05.2013 20:39, schrieb Øivind Loe:

With DMD, vibe.d and DUB at master, I get the following build warnings when running ./build.sh to build DUB, and everything stops:

Running dmd...
source/dub/installation.d(34): Warning: const field with initializer should be static, gshared, or an enum<br>source/dub/internal/vibecompat/core/file.d(93): Warning: explicit element-wise assignment templ[16LU..dollar - 1LU] = (suffix)[] is better than templ[16LU..__dollar - 1LU] = suffix

Should work for dub master now.

Thanks for the quick update. Now I get the following error when trying to run DUB:

$ dub -h
Fatal Error while loading '/usr/lib/x86_64-linux-gnu/libphobos2.so.0.63':

The module 'std.regex' is already defined in 'dub'.

Segmentation fault (core dumped)

Help! :)

Re: Build issue

On Wed, 29 May 2013 15:02:53 GMT, Øivind Loe wrote:

Thanks for the quick update. Now I get the following error when trying to run DUB:

$ dub -h
Fatal Error while loading '/usr/lib/x86_64-linux-gnu/libphobos2.so.0.63':

The module 'std.regex' is already defined in 'dub'.

Segmentation fault (core dumped)

Help! :)

Eeek, that looks like a problem with the new shared runtime support in DMD 2.063. I didn't expect that using the shared version of libphobos was going to be the default right from the start... I think that should go as a DMD bug report before 2.063 is actually released (almost too late), as this is probably not a problem specific to DUB.

To fix it, I guess it should suffice to copy "dmd2/linux/lib64/libphobos2.so" from the dmd zip file to "/usr/lib/x86_64-linux-gnu/" and possibly run ldconfig as root.

Re: Build issue

On Wed, 29 May 2013 15:22:29 GMT, Sönke Ludwig wrote:

On Wed, 29 May 2013 15:02:53 GMT, Øivind Loe wrote:

Thanks for the quick update. Now I get the following error when trying to run DUB:

$ dub -h
Fatal Error while loading '/usr/lib/x86_64-linux-gnu/libphobos2.so.0.63':

The module 'std.regex' is already defined in 'dub'.

Segmentation fault (core dumped)

Help! :)

Eeek, that looks like a problem with the new shared runtime support in DMD 2.063. I didn't expect that using the shared version of libphobos was going to be the default right from the start... I think that should go as a DMD bug report before 2.063 is actually released (almost too late), as this is probably not a problem specific to DUB.

To fix it, I guess it should suffice to copy "dmd2/linux/lib64/libphobos2.so" from the dmd zip file to "/usr/lib/x86_64-linux-gnu/" and possibly run ldconfig as root.

Hmm. If so, could you post this, as I don't have the full picture here?

Also, I am actually building everything from source. I already have libphobos2.so

ls /usr/lib/x86_64-linux-gnu/ | grep phobos
libphobos2.a
libphobos2.so
libphobos2.so.0.63
libphobos2.so.0.63.0
libphobos2.so.0.63.o

I tried to delete the .0.63 ones, but when I run "sudo ldconfig", libphobos2.so.0.63 keeps coming back. If I try to build and run dub without the .0.63 ones there, I get this error:

dub: error while loading shared libraries: libphobos2.so.0.63: cannot open shared object file: No such file or directory

Re: Build issue

On Wed, 29 May 2013 15:36:50 GMT, Øivind Loe wrote:

Hmm. If so, could you post this, as I don't have the full picture here?

Also, I am actually building everything from source. I already have libphobos2.so

ls /usr/lib/x86_64-linux-gnu/ | grep phobos
libphobos2.a
libphobos2.so
libphobos2.so.0.63
libphobos2.so.0.63.0
libphobos2.so.0.63.o

I tried to delete the .0.63 ones, but when I run "sudo ldconfig", libphobos2.so.0.63 keeps coming back. If I try to build and run dub without the .0.63 ones there, I get this error:

dub: error while loading shared libraries: libphobos2.so.0.63: cannot open shared object file: No such file or directory

Maybe removing all the .so files helps, so that it has to pick up the static one?

I'll have a look and will try to reproduce it when I get some time in the coming days if it still doesn't work by then.

Re: Build issue

On Wed, 29 May 2013 19:05:49 GMT, Sönke Ludwig wrote:

On Wed, 29 May 2013 15:36:50 GMT, Øivind Loe wrote:

Hmm. If so, could you post this, as I don't have the full picture here?

Also, I am actually building everything from source. I already have libphobos2.so

ls /usr/lib/x86_64-linux-gnu/ | grep phobos
libphobos2.a
libphobos2.so
libphobos2.so.0.63
libphobos2.so.0.63.0
libphobos2.so.0.63.o

I tried to delete the .0.63 ones, but when I run "sudo ldconfig", libphobos2.so.0.63 keeps coming back. If I try to build and run dub without the .0.63 ones there, I get this error:

dub: error while loading shared libraries: libphobos2.so.0.63: cannot open shared object file: No such file or directory

Maybe removing all the .so files helps, so that it has to pick up the static one?

I'll have a look and will try to reproduce it when I get some time in the coming days if it still doesn't work by then.

Nope. Didn't work removeing all of them. It still complains about not finding "libphobos2.so.0.63".

Thanks for looking into it.

Re: Build issue

No need to mess with filesystem - there is a "-defaultlib" flag for dmd, you can define static version of phobos there.
Static is still used by default on my system with v2.063.1 tag though, so I don't know how this has happened.

Re: Build issue

On Wed, 29 May 2013 19:20:25 GMT, Øivind Loe wrote:

On Wed, 29 May 2013 19:05:49 GMT, Sönke Ludwig wrote:

On Wed, 29 May 2013 15:36:50 GMT, Øivind Loe wrote:

Hmm. If so, could you post this, as I don't have the full picture here?

Also, I am actually building everything from source. I already have libphobos2.so

ls /usr/lib/x86_64-linux-gnu/ | grep phobos
libphobos2.a
libphobos2.so
libphobos2.so.0.63
libphobos2.so.0.63.0
libphobos2.so.0.63.o

I tried to delete the .0.63 ones, but when I run "sudo ldconfig", libphobos2.so.0.63 keeps coming back. If I try to build and run dub without the .0.63 ones there, I get this error:

dub: error while loading shared libraries: libphobos2.so.0.63: cannot open shared object file: No such file or directory

Maybe removing all the .so files helps, so that it has to pick up the static one?

I'll have a look and will try to reproduce it when I get some time in the coming days if it still doesn't work by then.

Nope. Didn't work removeing all of them. It still complains about not finding "libphobos2.so.0.63".

Thanks for looking into it.

Works now! :)

Re: Build issue

Funny, I get the same errors when compiling vibe using dub.
I'm on arch linux, using dub-git and dmd 2.063.
The errors I'm getting are :
../../../../.dub/packages/vibe-d-0.7.15/source/vibe/vpm/installation.d(35): Warning: const field with initializer should be static, gshared, or an enum<br>../../../../.dub/packages/vibe-d-0.7.15/source/vibe/core/file.d(60): Warning: explicit element-wise assignment templ[16LU..dollar - 1LU] = (suffix)[] is better than templ[16LU..__dollar - 1LU] = suffix

Should I downgrade dmd?

Pages: 1 2