Thread overview
[Bug 80] socket.d - static assert unimplemented or raspberry pi
Oct 13, 2013
Stefan Frijters
Oct 13, 2013
Stefan Frijters
Oct 13, 2013
Johannes Pfau
Oct 14, 2013
Stefan Frijters
Jan 12, 2014
Johannes Pfau
October 13, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=80

Stefan Frijters <sfrijters@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sfrijters@gmail.com

--- Comment #1 from Stefan Frijters <sfrijters@gmail.com> 2013-10-13 10:26:33 BST ---
Heh, I was just going to file the exact same bug. I'm building on Raspbian, but otherwise the config is the same. I took a look at the file and it looks like commit 1dc4fd3 to druntime will fix this[1] when 2.0.64 is released and merged into GDC. I'm going to try and continue the build process with that version of socket.d and see where I get.

[1] https://github.com/D-Programming-Language/druntime/commit/1dc4fd3ba737a04839ecb178f11fbeea5509c0ce#diff-d166081dc3be2fcc23df34657359023c

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
October 13, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=80

--- Comment #2 from Stefan Frijters <sfrijters@gmail.com> 2013-10-13 11:53:29 BST ---
(In reply to comment #1)
> Heh, I was just going to file the exact same bug. I'm building on Raspbian, but otherwise the config is the same. I took a look at the file and it looks like commit 1dc4fd3 to druntime will fix this[1] when 2.0.64 is released and merged into GDC. I'm going to try and continue the build process with that version of socket.d and see where I get.
> 
> [1] https://github.com/D-Programming-Language/druntime/commit/1dc4fd3ba737a04839ecb178f11fbeea5509c0ce#diff-d166081dc3be2fcc23df34657359023c

Ok, I investigated a bit further and a bunch of similar issues come up that are all fixed by copying from current druntime (explicit architecture checks were added some time ago, before the last frontend merge, but version(ARM) was added later). In particular, I had to update / add the following files:

core/sys/posix/sys/socket.d
core/sys/posix/signal.d
core/sys/posix/sys/stat.d
core/sys/posix/ucontext.d
core/sys/posix/sys/mman.d
core/sys/linux/sys/mman.d (new file, needs to be symlinked manually)
core/sys/linux/config.d
core/sys/posix/confid.d (not sure if either of these two config.d is enough).

So far the good news - easy to fix manually and will be fixed 'automatically' at the next frondend merge. But now I've run into an error beyond my meagre powers to fix:

/home/pi/objdir/./gcc/gdc -B/home/pi/objdir/./gcc/
-B/usr/local/stow/gdc-4.8.1/arm-linux-gnueabihf/bin/
-B/usr/local/stow/gdc-4.8.1/arm-linux-gnueabihf/lib/ -isystem
/usr/local/stow/gdc-4.8.1/arm-linux-gnueabihf/include -isystem
/usr/local/stow/gdc-4.8.1/arm-linux-gnueabihf/sys-include -o gcc/deh.o -Wall -g
-frelease -O2 -nostdinc -pipe -Wno-deprecated -I
../../../../gcc-4.8.1/libphobos/libdruntime -I ./arm-linux-gnueabihf -I .  -c
../../../../gcc-4.8.1/libphobos/libdruntime/gcc/deh.d
../../../../gcc-4.8.1/libphobos/libdruntime/gcc/deh.d:116: error: static assert
 (8u == 4u) is false
make[4]: *** [gcc/deh.o] Error 1
make[4]: Leaving directory
`/home/pi/objdir/arm-linux-gnueabihf/libphobos/libdruntime'

Should I file a separate bug report for this?

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
October 13, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=80

Johannes Pfau <johannespfau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |johannespfau@gmail.com
         AssignedTo|ibuclaw@gdcproject.org      |johannespfau@gmail.com

--- Comment #3 from Johannes Pfau <johannespfau@gmail.com> 2013-10-13 13:19:24 BST ---
I have fixes for most of those issues available here: https://github.com/jpf91/GDC/tree/arm

I wanted to merge this into GDC as soon as the test suite is passing. Unfortunately there's some hard to track down codegen bug which only appears when using -O2 and I couldn't fix it yet.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
October 14, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=80

--- Comment #4 from Stefan Frijters <sfrijters@gmail.com> 2013-10-14 07:32:31 BST ---
Thanks, didn't know about that fork. Just wanted to report that I did another round of building overnight, now based on your fork / arm branch, and the build process completed without any errors or needed hacks.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
January 12, 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=80

Johannes Pfau <johannespfau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Johannes Pfau <johannespfau@gmail.com> 2014-01-12 10:51:40 GMT ---
The 2.064 merge should have fixed this specific issue.

Druntime & Phobos should compile for ARM with upstream gdc. There are some small runtime issues left which are only fixed in my branch, but those are different issues and the fixes will be merged back soon anyway.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.