View previous topic :: View next topic |
Author |
Message |
manni
Joined: 16 Jan 2006 Posts: 25
|
Posted: Tue Aug 29, 2006 6:00 am Post subject: build on Linux |
|
|
Hello,
when i try to compile with build(3.02) under Debian Testing and SUSE 9.2, i get the
following error message:
Code: |
/dd$ /home/manni/dd/build-3.02/Source/build hello.d
Path and Version : /home/hansen/dd/build-3.02/Source/build v3.02(2208)
built on Tue Aug 29 13:50:20 2006
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread5startFZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread5startFZv+0xb8): undefined reference to `pthread_create'
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread4waitFZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread4waitFZv+0x38): undefined reference to `pthread_join'
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread4waitFkZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread4waitFkZv+0xdf): undefined reference to `pthread_cancel'
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread5pauseFZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread5pauseFZv+0x13): undefined reference to `pthread_kill'
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread5pauseFZv+0x3a): undefined reference to `sem_wait'
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread6resumeFZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread6resumeFZv+0x13): undefined reference to `pthread_kill'
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread8pauseAllFZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread8pauseAllFZv+0x40): undefined reference to `pthread_kill'
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread8pauseAllFZv+0x7b): undefined reference to `sem_wait'
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread4initFkZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread4initFkZv+0x20): undefined reference to `pthread_attr_setstacksize'
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread11thread_initFZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread11thread_initFZv+0xd7): undefined reference to `sem_init'
/usr/local/lib/libphobos.a(thread.o): In function `_D3std6thread6Thread12pauseHandlerUiZv':
std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread12pauseHandlerUiZv+0x74): undefined reference to `sem_post'
/usr/local/lib/libphobos.a(critical.o): In function `_STI_critical_init':
critical.c:(.text+0xb0): undefined reference to `pthread_mutexattr_init'
critical.c:(.text+0xbf): undefined reference to `pthread_mutexattr_settype'
/usr/local/lib/libphobos.a(monitor.o): In function `_STI_monitor_staticctor':
monitor.c:(.text+0x18): undefined reference to `pthread_mutexattr_init'
monitor.c:(.text+0x27): undefined reference to `pthread_mutexattr_settype'
/usr/local/lib/libphobos.a(monitor.o): In function `_STD_monitor_staticdtor':
monitor.c:(.text+0x77): undefined reference to `pthread_mutexattr_destroy'
collect2: ld returned 1 exit status
|
Version 2.09 run nice.
manni |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Tue Aug 29, 2006 5:42 pm Post subject: Re: build on Linux |
|
|
manni wrote: | Hello,
when i try to compile with build(3.02) under Debian Testing and SUSE 9.2, i get the
following error message:
|
You need to create a build.cfg file in the same directory where Build resides and that file must contain the lines ...
Code: |
[Posix:DigitalMars]
INIT:LinkLibSwitch = -l
CMDLINE=-op
CMDLINE=--release
|
_________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
manni
Joined: 16 Jan 2006 Posts: 25
|
Posted: Wed Aug 30, 2006 9:15 am Post subject: |
|
|
Thank you, that works.
manni |
|
Back to top |
|
|
sylverpyro
Joined: 23 May 2006 Posts: 28
|
Posted: Tue Oct 03, 2006 10:20 am Post subject: ./std folder? |
|
|
I didnt want to create a new topic for this and this topic matches closest.
Whenever I run build on my projects it generates a ./std folder in the directory that build was run out of. In the folder is a directory called c/ that contains a folder named linux/ that is empty.
Is this normal behaviour for the utility?
I am using dmd.168 on the back end.
Here is my build.cfg
Code: |
[Posix:DigitalMars]
INIT:LinkLibSwitch = -l
CMDLINE=-op
CMDLINE=-cleanup
|
|
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Thu Oct 05, 2006 12:30 am Post subject: Re: ./std folder? |
|
|
sylverpyro wrote: | I didnt want to create a new topic for this and this topic matches closest.
Whenever I run build on my projects it generates a ./std folder in the directory that build was run out of. In the folder is a directory called c/ that contains a folder named linux/ that is empty.
Is this normal behaviour for the utility?
I am using dmd.168 on the back end.
Here is my build.cfg
Code: |
[Posix:DigitalMars]
INIT:LinkLibSwitch = -l
CMDLINE=-op
CMDLINE=-cleanup
|
|
This appears to be a problem with DMD v0.168. Do you also get it when you compile this with just DMD...
Code: |
import std.c.linux;
void main() {}
|
_________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
sylverpyro
Joined: 23 May 2006 Posts: 28
|
Posted: Thu Oct 05, 2006 7:52 am Post subject: |
|
|
I am not sure what you mean by using just DMD...
I did try rolling my compiler back a few versions to .162 and doing it again, this time though it could not compile and just gave me a error message:
Code: |
object.d: module object cannot read file 'object.d'
|
So, not knowing why this is comming up, any ideas to work around this is the mean time or test this? I really want build to work at its best, Makefiles == evil.
Thanks |
|
Back to top |
|
|
sylverpyro
Joined: 23 May 2006 Posts: 28
|
Posted: Thu Oct 05, 2006 8:10 am Post subject: |
|
|
My fault, apparently I cannot read *parse error*
Quote: |
Do you also get it when you compile this with just DMD...
|
Ok, so I have tried compiling straight from dmd and the ./std folder does not get generated. This is the header of the program I am compiling:
Code: |
import std.stdio;
import std.stream;
import std.string;
import std.conv;
import std.file;
import smModules.smFolder;
import smModules.kiuFolder;
|
I dont have any references to std.c.linux in it which is why I am really confused about this (and the last two modules are custom and also do not have any calls std.c.linux)
Hope this helps |
|
Back to top |
|
|
AgentOrange
Joined: 21 Jul 2005 Posts: 61
|
Posted: Thu Oct 05, 2006 12:59 pm Post subject: |
|
|
fyi Heres what I know from looking at the dmd source code for .168, walter added a call to ensurePathExists() on the object filenames, which creates the directories if they dont exist.
This happens when the modules get initialized (when the filenames are set) this code is not taking into account the -Xstd, because phobos modules arent built..... |
|
Back to top |
|
|
sylverpyro
Joined: 23 May 2006 Posts: 28
|
Posted: Thu Oct 05, 2006 7:57 pm Post subject: |
|
|
Quote: |
This happens when the modules get initialized (when the filenames are set) this code is not taking into account the -Xstd, because phobos modules arent built.....
|
What do you mean by this exactly? |
|
Back to top |
|
|
|