D2 build errors - non-i386 archs not supported by druntime

vgivanovic avatarvgivanovic created an issue

Using a recent changeset (246c6894fd6f ) on Fedora 13 (2.6.34.6-47.fc13.x86_64) I get the following error:

../../../libphobos/std/stdio.d:33: module memory cannot read file 'core/memory.d

which is correct, the directory 'objdir/x86_64-unknown-linux-gnu/libphobos/common/core' is empty.

I'm attaching a log file of a make started after I updated my repository to 246c6894fd6f , i.e. some files may have already been made.

Comments (20)

  1. Iain Buclaw

    which is correct, the directory 'objdir/x86_64-unknown-linux-gnu/libphobos/common/core' is empty.

    Don't you mean the directory 'srcdir/libphobos/common/core/' ?

  2. Iain Buclaw

    Actually, I can see the problem with your build - automake isn't installed on your system, so the correct 'new' Makefile isn't being generated from Makefile.am.

    --> be right back after re-generating them myself.

  3. vgivanovic

    FYI: automake is installed. In fact, a plethora of automakes are installed:

    automake17-1.7.9-13.fc13.1.noarch automake14-1.4p6-20.fc13.noarch automake15-1.5-29.fc13.1.noarch automake16-1.6.3-18.fc13.1.noarch automake-1.11.1-1.fc13.noarch

    with this last one (automake 1.11.1) being in my PATH.

    I updated to the latest changeset (224029a0567d ) and I'm rebuilding from scratch. I'll report results as soon as I know. (It'll be a couple of hours. My CPU is a single core Athlon 64 running at 1.2GHz with 2GB of memory.)

  4. vgivanovic

    I've downgraded to the circa 2006 automake 1.9, and I'm building afresh.

    As an aside, it would be nice if the installation instructions and the setup-gcc.sh script had fail-safe versions of mkdir and ln, i.e. 'mkdir -p' and 'ln -sf'. Here is the script (lightly tested) that I use:

    <code>

    1. !/bin/sh -v

    SRCDIR=/src DOWNLOADDIR=/downloads

    cd "${SRCDIR}" if [ -d gdc ]; then cd gdc hg pull --update else hg clone https://goshawk@bitbucket.org/goshawk/gdc fi

    cd "${DOWNLOADDIR}" if [ ! -e gcc-4.4.4.tar.bz2 ]; then wget http://mirrors.kernel.org/gnu/gcc/gcc-4.4.4/gcc-4.4.4.tar.bz2 fi

    mkdir "${SRCDIR}"/gdc/dev cd "${SRCDIR}"/gdc/dev tar -xjvf "${DOWNLOADDIR}"/gcc-4.4.4.tar.bz2

    cd "${SRCDIR}"/gdc hg pull --update

    cd "${SRCDIR}"/gdc/dev/gcc-4.4.4 ln -sf ../../../d gcc/d

    echo "If setup-gcc.sh has alread been run, patch will ask if you wish to reverse apply the" echo "patches to configure, configure.ac, Makefile.def and Makefile.in. Answer 'no' to all questions."

    ./gcc/d/setup-gcc.sh --d-language-version=2 mkdir -p objdir

    cd objdir ../configure --enable-languages=d --disable-multilib --disable-shared

    make && sudo make install </code>

  5. Iain Buclaw

    You use a script ... to do a real man's job? :o)

    The automation of downloading gcc, updating of cloned branch, and setting up the directories is generally a bad idea from the start, and should be avoided.

    Adding a switch to rebuild the libphobos directory seems fair enough. Oh, and you can use the '-v1' and '-v2' switches to select the language version.

    ./gcc/d/setup-gcc.sh -v2
    

    Makes life a little less verbose...

    Regards

  6. vgivanovic

    Harrumph. I use a script because it beats thinking ;-) (Most of the script came from your installation instructions.)

    I'm still compiling 'libdecnumber' which seems to take ages...

  7. Michael Parrott

    I can't believe it takes so long. I have an Intel 1.8 GHz single core processor, with 2GB of RAM and a hard drive of around 60GB, and it takes me around 25min to compile GDC with GCC 4.4.

  8. vgivanovic

    -I ../../../libphobos -I ./x86_64-unknown-linux-gnu -c ../../../libphobos/compiler/gdc/invariant_.d /src/gdc/dev/gcc-4.4.4/objdir/./gcc/gdc -B/src/gdc/dev/gcc-4.4.4/objdir/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -o compiler/gdc/lifetime.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_GLibC -fversion=GC_Use_Data_Fixed -I ../../../libphobos/compiler/gdc -I ../../../libphobos/gc/basic -I ../../../libphobos/import -nostdinc -pipe \ -I ../../../libphobos -I ./x86_64-unknown-linux-gnu -c ../../../libphobos/compiler/gdc/lifetime.d /src/gdc/dev/gcc-4.4.4/objdir/./gcc/gdc -B/src/gdc/dev/gcc-4.4.4/objdir/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -o compiler/gdc/llmath.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_GLibC -fversion=GC_Use_Data_Fixed -I ../../../libphobos/compiler/gdc -I ../../../libphobos/gc/basic -I ../../../libphobos/import -nostdinc -pipe \ -I ../../../libphobos -I ./x86_64-unknown-linux-gnu -c ../../../libphobos/compiler/gdc/llmath.d ../../../libphobos/compiler/gdc/llmath.d: Assembler messages: ../../../libphobos/compiler/gdc/llmath.d:31: Error: suffix or operands invalid for `push' ../../../libphobos/compiler/gdc/llmath.d:74: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:81: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:137: Warning: indirect call without `*' ../../../libphobos/compiler/gdc/llmath.d:144: Warning: indirect call without `*' ../../../libphobos/compiler/gdc/llmath.d:161: Warning: indirect call without `*' ../../../libphobos/compiler/gdc/llmath.d:168: Warning: indirect jmp without `*' ../../../libphobos/compiler/gdc/llmath.d:186: Error: suffix or operands invalid for `push' ../../../libphobos/compiler/gdc/llmath.d:192: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:196: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:212: Error: suffix or operands invalid for `push' ../../../libphobos/compiler/gdc/llmath.d:213: Error: suffix or operands invalid for `push' ../../../libphobos/compiler/gdc/llmath.d:231: Warning: indirect call without `*' ../../../libphobos/compiler/gdc/llmath.d:234: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:235: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:249: Error: suffix or operands invalid for `push' ../../../libphobos/compiler/gdc/llmath.d:250: Error: suffix or operands invalid for `push' ../../../libphobos/compiler/gdc/llmath.d:263: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:264: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:271: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:272: Error: suffix or operands invalid for `pop' ../../../libphobos/compiler/gdc/llmath.d:291: Error: suffix or operands invalid for `pop' make[3]: * [compiler/gdc/llmath.o] Error 1 make[3]: Leaving directory `/usr/local/src/gdc/dev/gcc-4.4.4/objdir/x86_64-unknown-linux-gnu/libphobos' make[2]: * [all] Error 2 make[2]: Leaving directory `/usr/local/src/gdc/dev/gcc-4.4.4/objdir/x86_64-unknown-linux-gnu/libphobos' make[1]: * [all-target-libphobos] Error 2 make[1]: Leaving directory `/usr/local/src/gdc/dev/gcc-4.4.4/objdir' make: * [all] Error 2

  9. Iain Buclaw

    Vgivanovic, Just put it around code blocks to preserve formatting.

    Michaelp, do we have any need for llmath being in the library? Looks to be 32bit specific, and to meet a dependency of an internal compiler call (one that is DMD specific by the looks of it).

  10. Michael Parrott

    I'm not sure, because it says it gives us support for 64-bit longs in a 32-bit environment. If we removed the file, wouldn't we lose that?

    Or would we just implement the library calls in the compiler?

  11. Iain Buclaw

    I think we would need to implement the library calls into the compiler to make it useful...

    [iain@maverick gdc]$ grep "ULDIV" d/ -lR
    d/phobos/internal/llmath.d
    d/druntime/compiler/gdc/llmath.d
    
    [iain@maverick gdc]$ grep "llmath" d/ -lR
    d/ChangeLog
    d/phobos/internal/llmath.d
    d/druntime/compiler/gdc/llmath.d
    d/phobos2/Makefile.am
    d/phobos2/Makefile.in
    

    Nope, we don't need it. Must've slipped in during some blind copying of the druntime Makefile into GDC... :-)

    I'll remove it from the Makefile...

  12. vgivanovic

    With

    $ hg summary --verbose
    parent: 246:6b7397510e33 tip
     Remove llmath.d from D2
    branch: default
    commit: 2 modified, 1 unknown
    update: (current)
    mq:     (empty queue)
    chopin gdc $ hg status
    M d/phobos2/configure
    M d/setup-gcc.sh
    

    [The changes to configure & setup.gcc.sh are just 'mkdir -> mkdir -p' and 'ln -s -> ln -sf'.]

    I get:

    /src/gdc/dev/gcc-4.4.4/objdir/./gcc/gdc -B/src/gdc/dev/gcc-4.4.4/objdir/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -o compiler/gdc/memory.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_GLibC -fversion=GC_Use_Data_Fixed -I ../../../libphobos/compiler/gdc -I ../../../libphobos/gc/basic -I ../../../libphobos/import -nostdinc -pipe   \
    	-I ../../../libphobos -I ./x86_64-unknown-linux-gnu -c ../../../libphobos/compiler/gdc/memory.d
    ../../../libphobos/compiler/gdc/memory.d:100: static assert  "Architecture not supported."
    make[3]: *** [compiler/gdc/memory.o] Error 1
    make[3]: Leaving directory `/usr/local/src/gdc/dev/gcc-4.4.4/objdir/x86_64-unknown-linux-gnu/libphobos'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/usr/local/src/gdc/dev/gcc-4.4.4/objdir/x86_64-unknown-linux-gnu/libphobos'
    make[1]: *** [all-target-libphobos] Error 2
    make[1]: Leaving directory `/usr/local/src/gdc/dev/gcc-4.4.4/objdir'
    make: *** [all] Error 2
    
  13. vgivanovic

    Running 'make check' yields:

    # of expected passes		57820
    # of unexpected failures	11
    # of expected failures		192
    # of unresolved testcases	2
    # of unsupported tests		740
    

    I've attached the full log file.

    Are there any other tests I should run?

  14. Iain Buclaw

    make check runs GCC-specific tests.

    You can run

    make check-target-libphobos
    

    to build a debug library with unittests enabled + run all unittests. But that is not at a working state yet...

  15. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.