[Barrelfish-users] Build problems
Kornilios Kourtis
kornilios.kourtis at inf.ethz.ch
Tue Apr 24 15:59:07 CEST 2012
Hi,
On Tue, Apr 24, 2012 at 01:15:54PM +0000, Mats Brorsson wrote:
> Hi,
>
> I'm trying to keep up with my students and decided to try to build
> Barrelfish but immediately stumbled upon problems.
>
> My build system:
> Gcc version 4.6.1
> Ghc version 6.10.4
> Binutils version 2.21.53
>
> I’m trying to compile Barrelfish from the mercurial repository
> according tot he instructions on the Wiki and get into the following
> error when I make:
>
> mkdir -p ./x86_32/usr/skb/testapps/_for_app_speed
> touch ./x86_32/usr/skb/testapps/_for_app_speed/.marker
> Generating x86_32/usr/skb/testapps/_for_app_speed/apps.o.depend
> ../usr/skb/testapps/apps.c:128:25: fatal error: openssl/err.h: No such file or directory
> compilation terminated.
> make: *** [x86_32/usr/skb/testapps/_for_app_speed/apps.o.depend] Error 1
>
> When I instead try to build from the snapshort, it goes much further
> but I fail to link with the following error:
>
> gcc -g -O2 ./x86_32/lib/crt0.o ./x86_32/lib/crtbegin.o -fno-builtin -nostdlib -Wl,-section-start,.text=0x400000 -Wl,-section-start,.data.rel.ro=0x600000 -Wl,-z,max-page-size=0x1000 -Wl,--build-id=none -m32 -o ./x86_32/sbin/thcidctest ./x86_32/usr/tests/thcidctest/_for_app_thcidctest/thcidctest.o ./x86_32/usr/tests/thcidctest/_for_app_thcidctest/ping_pong_flounder_bindings.o ./x86_32/usr/tests/thcidctest/_for_app_thcidctest/ping_pong_thc.o ./x86_32/lib/libthc.a ./x86_32/lib/libbarrelfish.a ./x86_32/errors/errno.o ./x86_32/lib/libnewlib.a ./x86_32/lib/crtend.o ./x86_32/lib/libcollections.a -lgcc
> /usr/bin/ld: section .ctors loaded at [0000000000600050,0000000000600057] overlaps section .data.rel.ro loaded at [0000000000600000,0000000000600c77]
> collect2: ld returned 1 exit status
> make: *** [x86_32/sbin/skb] Error 1
> make: *** Waiting for unfinished jobs....
>
> any ideas?
These seem to be problems that will be fixed in our next release, which
will happen when our regression tests pass (hopefully that won't take too
long). Until then, however, a fix for the second error is change the
linker flags in hake/X8_32.hs as the following patch:
diff -r 8c28b2e5d3fd -r 95e53288bd43 hake/X86_32.hs
--- a/hake/X86_32.hs Tue Mar 27 23:27:34 2012 +0200
+++ b/hake/X86_32.hs Wed Mar 28 01:00:57 2012 +0200
@@ -45,7 +45,7 @@
cDefines = ArchDefaults.cDefines options
-ourLdFlags = [ Str "-Wl,-section-start,.text=0x400000",
+ourLdFlags = [ Str "-Wl,-section-start,.text=0x300000",
Str "-Wl,-section-start,.data.rel.ro=0x600000",
Str "-Wl,-z,max-page-size=0x1000",
Str "-Wl,--build-id=none",
Hope that helps,
Kornilios.
--
Kornilios Kourtis
More information about the Barrelfish-users
mailing list