1. Building from Euphoria repository

I checked out the source and tried building but it threw all these errors. I swear I just did the same thing the other day on another Linux box without any problems. Both are running Ubuntu 10.04. Did I miss something?

/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start': 
(.text+0x18): undefined reference to `main' 
/home/greg/euphoria/source/build/intobj/back/be_task.o: In function `call_task': 
be_task.c:(.text+0x3a1): undefined reference to `_00' 
/home/greg/euphoria/source/build/intobj/back/be_task.o: In function `ctask_create': 
be_task.c:(.text+0x18c8): undefined reference to `_00' 
/home/greg/euphoria/source/build/intobj/back/be_runtime.o: In function `ctrace': 
be_runtime.c:(.text+0x7b3a): undefined reference to `Argc' 
/home/greg/euphoria/source/build/intobj/back/be_runtime.o: In function `eu_startup': 
be_runtime.c:(.text+0x84f0): undefined reference to `Argc' 
/home/greg/euphoria/source/build/intobj/back/be_runtime.o: In function `shift_args': 
be_runtime.c:(.text+0x9806): undefined reference to `Argc' 
be_runtime.c:(.text+0x980b): undefined reference to `Argc' 
be_runtime.c:(.text+0x981b): undefined reference to `Argv' 
be_runtime.c:(.text+0x9820): undefined reference to `Argv' 
be_runtime.c:(.text+0x982d): undefined reference to `Argv' 
be_runtime.c:(.text+0x9847): undefined reference to `Argv' 
/home/greg/euphoria/source/build/intobj/back/be_runtime.o: In function `Command_Line': 
be_runtime.c:(.text+0x98a3): undefined reference to `Argv' 
be_runtime.c:(.text+0x98ac): undefined reference to `Argc' 
be_runtime.c:(.text+0x98f4): undefined reference to `Argc' 
collect2: ld returned 1 exit status 
make[2]: *** [/home/greg/euphoria/source/build/eui] Error 1 
make[2]: Leaving directory `/home/greg/euphoria/source' 
make[1]: *** [interpreter] Error 2 
make[1]: Leaving directory `/home/greg/euphoria/source' 
make: *** [all] Error 2 

-Greg

new topic     » topic index » view message » categorize

2. Re: Building from Euphoria repository

ghaberek said...

I checked out the source and tried building but it threw all these errors. I swear I just did the same thing the other day on another Linux box without any problems. Both are running Ubuntu 10.04. Did I miss something?

Which branch are you working from? When I get unexpected stuff like that, it's usually from reusing a build directory from another branch or something, and running "make cleann" usually clears that up. Also, if you switch branches, you need to run the configure script again.

I keep different build directories for various branches and configurations. Recently, I've been using these:

32/ 
4.0/ 
64/ 
mingw32/ 
mingw64/ 
struct/sixtyfour 
struct/thirtytwo 
struct/win/sixtyfour 
struct/win/thirtytwo 

I have shell scripts that optionally update to a particular branch and run configure for me so that I get a consistent setup. Here's what my configstruct script looks like:

#!/bin/sh 
 
BUILDBASE=../struct 
BUILDBITS=/sixtyfour 
ARCH=x86.64 
while [ "$1" != "" ]; do 
        case $1 in 
                up*) 
                        hg up -C struct 
                        ;; 
 
                32*) 
                        ARCH=x86 
                        BUILDBITS=/thirtytwo 
                        ;; 
                win*) 
                        BUILDOS=/win 
        esac 
 
        shift 
done 
 
if [ "$BUILDOS" = "/win" ]; then 
        if [ "$ARCH" = "x86" ]; then 
                HOST="--cc-prefix i686-w64-mingw32-" 
        else 
                HOST="--cc-prefix x86_64-w64-mingw32-" 
        fi 
        PLAT="--plat=WINDOWS" 
fi 
 
./configure --build $BUILDBASE$BUILDOS$BUILDBITS --arch $ARCH $HOST $PLAT 
 

I have similar scripts for the 4.0 branch and the default (i.e., trunk, 4.1) branch.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: Building from Euphoria repository

ghaberek said...

I checked out the source and tried building but it threw all these errors. I swear I just did the same thing the other day on another Linux box without any problems. Both are running Ubuntu 10.04. Did I miss something?

{{{ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' /home/greg/euphoria/source/build/intobj/back/be_task.o: In function `call_task': be_task.c:(.text+0x3a1): undefined reference to `_00' /home/greg/euphoria/source/build/intobj/back/be_task.o: In function `ctask_create': be_task.c:(.text+0x18c8): undefined reference to `_00' /home/greg/euphoria/source/build/intobj/back/be_runtime.o: In function `ctrace': be_runtime.c:(.text+0x7b3a): undefined reference to `Argc'

I've seen this before, when I run configure from a new branch and forget to pass the -eubin option to tell it where the current version of 4.1 eui is located.

If eui is installed in the path somewhere, and is executable, the configure script will run it and detect that it works, in which case it uses that eui to do the translation. (4.0.3's eui can't build the 4.1 code, you need to use an eui from the head of the 4.0 branch to build a working 4.1 eui.) If it can't find eui, then it assumes that you are using pre-translated source code and sets up the Makefile to only compile the C code. (The configure script doesn't bother to check to see if pre-translated source code exists at this point.)

In this case, the Makefile tries to build only the backend custom .c files which exist, and then tries to link the executable without any of the code that defines the front-end side symbols (such as _00 or Argc). That code doesn't exist because we never ran eui to translate the front-end into C, so the build fails.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Building from Euphoria repository

If you only have 4.0.3 or earlier and don't want too much hassle in getting a workable eui for the translation step, you can just grab a 4.1.0 eubin use that to build the latest code.

http://openeuphoria.org/eubins/linux/4.1.0/32-bit/eubin-2011-06-29-3739d931e005.tar.gz

new topic     » goto parent     » topic index » view message » categorize

5. Re: Building from Euphoria repository

jimcbrown said...

I've seen this before, when I run configure from a new branch and forget to pass the -eubin option to tell it where the current version of 4.1 eui is located.

If eui is installed in the path somewhere, and is executable, the configure script will run it and detect that it works, in which case it uses that eui to do the translation. (4.0.3's eui can't build the 4.1 code, you need to use an eui from the head of the 4.0 branch to build a working 4.1 eui.) If it can't find eui, then it assumes that you are using pre-translated source code and sets up the Makefile to only compile the C code. (The configure script doesn't bother to check to see if pre-translated source code exists at this point.)

In this case, the Makefile tries to build only the backend custom .c files which exist, and then tries to link the executable without any of the code that defines the front-end side symbols (such as _00 or Argc). That code doesn't exist because we never ran eui to translate the front-end into C, so the build fails.

That would make sense. I had already been working with the latest eubins on the first Ubuntu box before I downloaded and compiled from the repository. On this new box, I was starting fresh.

jimcbrown said...

If you only have 4.0.3 or earlier and don't want too much hassle in getting a workable eui for the translation step, you can just grab a 4.1.0 eubin use that to build the latest code.

http://openeuphoria.org/eubins/linux/4.1.0/32-bit/eubin-2011-06-29-3739d931e005.tar.gz

Thanks, I think I'll do that.

-Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu