October 16, 2013
On Tuesday, 15 October 2013 at 22:52:42 UTC, Andrew wrote:
> andrew@islay:~/dub$ ./build.sh
> Generating version file...
> Running gdmd...
> /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core/time.di:224: error: this cannot be interpreted at compile time, because it has no available source code
> /usr/local/gdc/include/d/4.8.2/std/net/curl.d:195: note: called from here: dur(2L)
>
> line 224 is trying to instantiate a Duration object. Any ideas ?

Here the problem is that your install script has provided only *.di files as bindings to druntime and `dub` tries to use some of those function for compile-time constfolding (CTFE) which requires having full function source. *.di are supposed to be bindings to library blobs for cases when you want to hide implementation from end user, no idea why those are used here. Normal DMD install puts those as plain *.d modules.
October 16, 2013
On Tuesday, 15 October 2013 at 23:16:07 UTC, Brad Roberts wrote:
> I think you mean catch-22 rather than dead-end.  There's not more people helping support ARM due to ARM not yet working well, so there's no developers.
>
> ARM's not exotic, it's just not on as many people's desktops.  Thats been changing rapidly over the last several years.

In my opinion "catch-22" is partial case of a dead-end - something that blocks your effective forward movement :)

ARM support is rather exotic among projects of current D users.
October 16, 2013
On Tuesday, 15 October 2013 at 23:03:15 UTC, Andrew wrote:
> Thanks for your patience supporting me BTW.

You are welcome. D development is pure open-source movement with all its pros and cons - almost anyone here will gladly help you not only because we care about a good public image but because it gives a chance that you may investigate and improve situation in currently under-explored domain, to the greater community benefit. It is very important to have someone with personal interest in such development areas, helping with few cheap advises is the very least we can do :)
October 16, 2013
On Wednesday, 16 October 2013 at 09:11:16 UTC, Andrew wrote:
>
>> As far as I know deimos is a set of official (?) bindings for common C libraries. I don't know dub's build process but I assume that if the build script would have worked for you it would have attempted to clone this repo https://github.com/D-Programming-Deimos/openssl (you can find more bindings if you go up one level). My gdc build hadn't finished yet when I had to leave for work this morning, but I'll try to build dub tonight, to see if I run into the same problems...
>
> I've been using a Cubieboard A20, it's much better than a RPi as it has 1GB RAM, dual core armv7 and much better IO including on-board SATA for $50. The gcc /gdc build takes around 2 - 3 hours on that. You'll probably run into the same libphobos issues that I had, since there are many places where there are no ARM headers.

Ok, I logged onto my Pi during lunch break, and actually the compilation process went fine, and pragma(msg, __VERSION__); now correctly has 2063L as output. So in my recent experience:

- GDC master branch doesn't compile properly, because it's missing the ARM-specific code.
- GDC-jp91 master branch compiles, but is based on 2.060 and is too old to be useful.
- GDC-jp91 arm branch seems to work, although Johannes has warned that there is some codegen bug when compiling with -O2.

This is all now a bit confusing, but I expect GDC master branch to compile again for ARM when either frontend version 2.064 is released and merged into GDC (in a few weeks hopefully?), or Johannes' arm fork is merged into GDC (whenever he has time to find and fix his codegen bug). Then everything would be (relatively) easy again...

Looking into dub / vibe.d is out of my lunch scope :-P
October 16, 2013
I'm a very happy man ! Everything is built and working including dub and the http_server example from vibe.d.

It's slow to build, but it executes quickly and strips down to about 3MB which is heavy but tolerable.

Thanks to everybody for the help, now I can start learning D, exploring vibe.d and Pegged and hopefully make some good progress on my MUD.

So to recap, to help anybody else building on ARM these are the steps I took :-

mkdir gdc
cd gdc
wget http://gcc.igor.onlinedirect.bg/snapshots/LATEST-4.8/gcc-4.8-20131010.tar.bz2
tar xvf gcc-4.8-20131010.tar.bz2
git clone https://github.com/jpf91/GDC.git arm_gdc
cd arm_gdc
git checkout arm
./setup-gcc.sh ../gcc-4.8-20131010
cd ../
mkdir build
cd build
export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)
export EXTRA_CONF="-mfloat-abi=hard --with-float=hard"
../gcc-4.8-20131010/configure --enable-languages=d --disable-bootstrap --prefix=/usr/local/gdc --disable-multilib --disable-softfloat --with-float=hard
make -j2
sudo make install
sudo cp ../arm_gdc/libphobos/libdruntime/core/time.d /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core
sudo mv /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core/time.di /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core/time.di.old

I don't know why that last step was necessary but dub and a few other things didn't build without it.

After that dub built fine once I'd hacked the build file to use gdc.


October 16, 2013
On Wednesday, 16 October 2013 at 19:18:53 UTC, Andrew wrote:
> I'm a very happy man ! Everything is built and working including dub and the http_server example from vibe.d.
>
> It's slow to build, but it executes quickly and strips down to about 3MB which is heavy but tolerable.
>
> Thanks to everybody for the help, now I can start learning D, exploring vibe.d and Pegged and hopefully make some good progress on my MUD.
>
> So to recap, to help anybody else building on ARM these are the steps I took :-
>
> mkdir gdc
> cd gdc
> wget http://gcc.igor.onlinedirect.bg/snapshots/LATEST-4.8/gcc-4.8-20131010.tar.bz2
> tar xvf gcc-4.8-20131010.tar.bz2
> git clone https://github.com/jpf91/GDC.git arm_gdc
> cd arm_gdc
> git checkout arm
> ./setup-gcc.sh ../gcc-4.8-20131010
> cd ../
> mkdir build
> cd build
> export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)
> export EXTRA_CONF="-mfloat-abi=hard --with-float=hard"
> ../gcc-4.8-20131010/configure --enable-languages=d --disable-bootstrap --prefix=/usr/local/gdc --disable-multilib --disable-softfloat --with-float=hard
> make -j2
> sudo make install
> sudo cp ../arm_gdc/libphobos/libdruntime/core/time.d /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core
> sudo mv /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core/time.di /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core/time.di.old
>
> I don't know why that last step was necessary but dub and a few other things didn't build without it.
>
> After that dub built fine once I'd hacked the build file to use gdc.

Cool. I was posting in the D.GNU newsgroup about this when I noticed your update, so I included a link to this work around in my post [1]. Maybe Iain or any of the other gurus know of a better way, because the last part looks awfully dirty :-D

[1] http://forum.dlang.org/post/wshaxsawkvkwfaefpirj@forum.dlang.org
October 16, 2013
On Wednesday, 16 October 2013 at 19:18:53 UTC, Andrew wrote:
> I'm a very happy man ! Everything is built and working including dub and the http_server example from vibe.d.
>
> It's slow to build, but it executes quickly and strips down to about 3MB which is heavy but tolerable.
>
> Thanks to everybody for the help, now I can start learning D, exploring vibe.d and Pegged and hopefully make some good progress on my MUD.
>
> So to recap, to help anybody else building on ARM these are the steps I took :-
>
> mkdir gdc
> cd gdc
> wget http://gcc.igor.onlinedirect.bg/snapshots/LATEST-4.8/gcc-4.8-20131010.tar.bz2
> tar xvf gcc-4.8-20131010.tar.bz2
> git clone https://github.com/jpf91/GDC.git arm_gdc
> cd arm_gdc
> git checkout arm
> ./setup-gcc.sh ../gcc-4.8-20131010
> cd ../
> mkdir build
> cd build
> export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)
> export EXTRA_CONF="-mfloat-abi=hard --with-float=hard"
> ../gcc-4.8-20131010/configure --enable-languages=d --disable-bootstrap --prefix=/usr/local/gdc --disable-multilib --disable-softfloat --with-float=hard
> make -j2
> sudo make install
> sudo cp ../arm_gdc/libphobos/libdruntime/core/time.d /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core
> sudo mv /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core/time.di /usr/local/gdc/include/d/4.8.2/armv7l-unknown-linux-gnueabihf/core/time.di.old
>
> I don't know why that last step was necessary but dub and a few other things didn't build without it.
>
> After that dub built fine once I'd hacked the build file to use gdc.

This is very cool. You should add it to the wiki so it doesn't get lost: http://wiki.dlang.org
October 17, 2013
Does anybody know if this is now fixed ? :-

https://bitbucket.org/goshawk/gdc/issue/120/fsection-anchors-broken-on-arm

I might be wrong but I could be facing this bug when trying to run any of the vibe.d samples, here's an example :-

(gdb) cont
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x001ad15c in gc_addRange () at ../../../../gcc-4.8-20131010/libphobos/libdruntime/gc/gc.d:293
#2 0x00174fb4 in vibe.utils.memory.T19FreeListObjectAllocTS4vibe4core7drivers13libevent2_tcp10TCPContextVb0Vb1Z.T5allocTC4vibe4core6driver10DriverCoreTPS6deimos6event212eventstruct10eventbaseTiTPS6deimos6event211bufferevent11buffereventTS4vibe4core3net14NetworkAddressTS4vibe4core3net14NetworkAddressZ.alloc() ()
#3 0x00034008 in vibe.core.drivers.libevent2_tcp.onConnect() ()
#4 0x00043430 in vibe.core.core.CoreTask.run() ()
#5 0x001a37fc in fiber_entryPoint () at ../../../../gcc-4.8-20131010/libphobos/libdruntime/core/thread.d:3800
#6 0xb6cbe0b0 in setcontext () from /lib/arm-linux-gnueabihf/libc.so.6
#7 0xb6cbe0b0 in setcontext () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
1 2 3 4
Next ›   Last »