FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

build and arm-wince-pe-gdc on linux

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
gamerChad



Joined: 13 Aug 2005
Posts: 21
Location: Cydonia, Mars

PostPosted: Fri Aug 18, 2006 4:16 pm    Post subject: build and arm-wince-pe-gdc on linux Reply with quote

Now I've read other people talking about linux problems, but this one seems different. I'm wondering if I'm just doing something stupid and/or if there is a workaround.

What I want to do is use build to compile a project using my arm-wince-pe-gdc crosscompiler. I am running on linux and have dmd as my native compiler. So I used the Makefile.Unix to compile build. Then I moved the resulting build executable into /usr/local/arm-wince-pe/bin (the directory where my cross-compiler executable is) and renamed it to arm-wince-pe-dbuild. I then put a build.cfg file in that same directory, and put the following into that file:

INIT:CompilerExe = arm-wince-pe-gdc
INIT:LinkerExe = arm-wince-pe-gdmd
INIT:Librarian = arm-wince-pe-ar
INIT:LibPaths = /usr/local/arm-wince-pe/arm-wince-pe/lib
INIT:BuildImportPath = /usr/local/arm-wince-pe/include/d/4.0.3

When I try to use arm-wince-pe-dbuild, it gives me the following errors:

/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../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/lib/gcc/i486-linux-gnu/4.0.3/../../../../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/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libphobos.a(monitor.o): In function `_STD_monitor_staticdtor':monitor.c:(.text+0x77): undefined reference to `pthread_mutexattr_destroy'
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libphobos.a(thread.o): In function `_D3std6thread6Thread5startFZv':std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread5startFZv+0xb8): undefined reference to `pthread_create'
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libphobos.a(thread.o): In function `_D3std6thread6Thread4waitFZv':std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread4waitFZv+0x38): undefined reference to `pthread_join'
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libphobos.a(thread.o): In function `_D3std6thread6Thread4waitFkZv':std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread4waitFkZv+0xdf): undefined reference to `pthread_cancel'
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../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/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libphobos.a(thread.o): In function `_D3std6thread6Thread6resumeFZv':std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread6resumeFZv+0x13): undefined reference to `pthread_kill'
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../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/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libphobos.a(thread.o): In function `_D3std6thread6Thread4initFkZv':std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread4initFkZv+0x20): undefined reference to `pthread_attr_setstacksize'
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libphobos.a(thread.o): In function `_D3std6thread6Thread11thread_initFZv':std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread11thread_initFZv+0xd7): undefined reference to `sem_init'
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libphobos.a(thread.o): In function `_D3std6thread6Thread12pauseHandlerUiZv':std/thread.d:(.gnu.linkonce.t_D3std6thread6Thread12pauseHandlerUiZv+0x74): undefined reference to `sem_post'
collect2: ld returned 1 exit status

The problem here is not that it's forgetting to link in pthreads; it's that pthreads shouldn't be needed at all. ARM/WinCE is a windows platform and doesn't use pthreads. Build is somehow using the wrong phobos. It should use the arm-wince phobos, but it is using the native phobos. Is there some way to tell build to NOT search /usr/lib?

It almost acts like it doesn't even see that build.cfg file, as i've tried things like giving it invalid compiler executable names and it still compiles and fails on linking like above. Also, it's using ld instead of arm-wince-pe-ld.

Also, when I use the -v or -test switches, it does exactly the same thing and I get no additional info.

I'd appreciate any help here.

Thanks for the killer tool Derek, build rocks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group