1. Build failed due to linking error.

Hello,

I attempted to download and build Euphoria. So I installed hg and downloaded the latest from the repo. The build seemed to go ok until linking. The following is my output of just the errors and warnings. As you can see, there are several warnings but no errors. Then a failure to link.

Thanks for your help.

  
[ronald@localhost source]$ make  > make.out 
/home/ronald/dev/open_euphoria/euphoria/source/be_callc.c: In function ‘call_c’: 
/home/ronald/dev/open_euphoria/euphoria/source/be_callc.c:1269:33: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘intptr_t {aka long int}’ [-Wformat=] 
   snprintf(TempBuff, TEMP_SIZE, "C routine %s() needs %d argument%s, not %d", 
                                 ^ 
/home/ronald/dev/open_euphoria/euphoria/source/be_callc.c:1269:33: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘intptr_t {aka long int}’ [-Wformat=] 
/home/ronald/dev/open_euphoria/euphoria/source/be_callc.c:1269:33: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘intptr_t {aka long int}’ [-Wformat=] 
/home/ronald/dev/open_euphoria/euphoria/source/be_callc.c:1269:33: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘intptr_t {aka long int}’ [-Wformat=] 
/home/ronald/dev/open_euphoria/euphoria/source/be_callc.c:1161:15: warning: variable ‘argsize’ set but not used [-Wunused-but-set-variable] 
  volatile int argsize;   // !!!! number of bytes to pop 
               ^ 
/home/ronald/dev/open_euphoria/euphoria/source/be_rterror.c: In function ‘LookBackForSubscriptSymbol’: 
/home/ronald/dev/open_euphoria/euphoria/source/be_rterror.c:1275:27: warning: initialization makes pointer from integer without a cast [-Wint-conversion] 
    symtab_ptr assign_to = *(pc+3); 
                           ^ 
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/crt1.o: In function `_start': 
(.text+0x20): undefined reference to `main' 
/home/ronald/dev/open_euphoria/euphoria/source/build/intobj/back/be_task.o: In function `ctask_create': 
be_task.c:(.text+0xa74): undefined reference to `_00' 
/home/ronald/dev/open_euphoria/euphoria/source/build/intobj/back/be_task.o: In function `start_task': 
be_task.c:(.text+0x1086): undefined reference to `_00' 
/home/ronald/dev/open_euphoria/euphoria/source/build/intobj/back/be_runtime.o: In function `ctrace': 
be_runtime.c:(.text+0x3130): undefined reference to `Argc' 
/home/ronald/dev/open_euphoria/euphoria/source/build/intobj/back/be_runtime.o: In function `eu_startup': 
be_runtime.c:(.text+0x328d): undefined reference to `Argc' 
/home/ronald/dev/open_euphoria/euphoria/source/build/intobj/back/be_runtime.o: In function `shift_args': 
be_runtime.c:(.text+0x3dd6): undefined reference to `Argc' 
be_runtime.c:(.text+0x3de9): undefined reference to `Argv' 
be_runtime.c:(.text+0x3df9): undefined reference to `Argv' 
be_runtime.c:(.text+0x3e17): undefined reference to `Argv' 
/home/ronald/dev/open_euphoria/euphoria/source/build/intobj/back/be_runtime.o: In function `Command_Line': 
be_runtime.c:(.text+0x3e50): undefined reference to `Argc' 
be_runtime.c:(.text+0x3e57): undefined reference to `Argv' 
be_runtime.c:(.text+0x3e68): undefined reference to `Argc' 
collect2: error: ld returned 1 exit status 
make[3]: *** [/home/ronald/dev/open_euphoria/euphoria/source/build/eui] Error 1 
make[2]: *** [interpreter] Error 2 
make[1]: *** [interpreter] Error 2 
make: *** [all] Error 2 

new topic     » topic index » view message » categorize

2. Re: Build failed due to linking error.

xecronix said...

Hello,

I attempted to download and build Euphoria. So I installed hg and downloaded the latest from the repo. The build seemed to go ok until linking. The following is my output of just the errors and warnings. As you can see, there are several warnings but no errors. Then a failure to link.

Thanks for your help.

You need pretranslated sources.

See http://openeuphoria.org/forum/m/127604.wc

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

3. Re: Build failed due to linking error.

Thanks. With a little more information this answer would have been great. But as it was, it was enough to put me on the right path. So, with that in mind, here's a more complete answer as I hope it helps someone.

To compile Euphoria you basically need Euphoria installed. Euphoria is used to translate some Euphoria source files into C before compiling. This is why you need Euphoria.

So, assuming you don't have Euphoria you have at least 3 options.

  1. Find pre-translated source files. I did not take this route because I wasn't sure if the translations were for 32 bit or 64 bit or if that even mattered at all. But I did find translated code under the heading “Translated C Source Code Releases” on this page. http://openeuphoria.org/wiki/view/DownloadEuphoria.wc
  2. Use an installer to install Euphoria before attempting to build. I did not take this route either. I did see some packages on Sourceforge for many install options. Windows installers, RPM, deb, packages and others are available. See http://openeuphoria.org/wiki/view/DownloadEuphoria.wc for more details.
  3. Use a development version of Euphoria to do the translations. This is the route I took. Find the section header titled “Eubins Development Versions”. (also found here: http://openeuphoria.org/wiki/view/DownloadEuphoria.wc) There is a link you can find there that will take you to some development versions of Euphoria. Simply uncompress the appropriate version for your OS and architecture somewhere where you'll remember the file path.

The rest of this response assumes that you have Euphoria installed probably using one of the 3 methods described above. (Like option 3 for example) Additionally, the rest of the response assumes a Linux environment. Other environments will differ but hopefully this is enough to point you in the right direction.

At the moment, the Euphoria Dev Team favors Mercurial source code version control. So the best way to get the latest code would be to get it from there. On my Fedora 22 system that involved first installing a program called hg.

sudo dnf install hg-git hgsvn hgview 

Once installed, I grabbed the source using the command line like this:

mkdir open_euphoria 
cd open_euphoria 
hg clone http://scm.openeuphoria.org/hg/euphoria 

The above commands will result in a new directory called “euphoria/source”.

cd euphoria/source 

Ok… so how did you install Euphoria? If you installed it using ether option 1 or option 2 above, you should be be able to simply run configure.

./configure 

If, like me, you “installed” Euphoria using a development version, you'll need to run configure like this. Where this represents the full path to bin directory contained in you development version of Euphoria.

./configure --eubin ~/euphoria/bin 

Now, you can simply make and make install Euphoria

make 
sudo make install 

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

4. Re: Build failed due to linking error.

xecronix said...

Thanks. With a little more information this answer would have been great.

I thought it was enough to point you to the answer, as this has been asked dozens of times.

There's even a wiki page about it: http://openeuphoria.org/wiki/view/Compiling41windows.wc

Edit: Thank you for taking the time to figure out and then post your up to date instructions. That kind of effort is very much appreciated.

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

5. Re: Build failed due to linking error.

Hi xecronix,

Thanks for explaining the details to get it working, I think this is one of the weakest points we've right now.

What jim quoted is actually a quick wiki page I did but it's for Windows, so they're similar but not the exact steps, if you're willing to, a new page that explains this for Linux would be really helpful.

Probably we also need to see how to put this somewhere quicker to access because as jim said, it's a common question.

Cheers,
Guillermo

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

6. Re: Build failed due to linking error.

I don't mind cleaning up this post a bit and creating a "Compile Instructions for Linux" wiki page. I think the place to link such a page would be from the Downloads page under the title "From Source-code". I'll work on that later today.

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

7. Re: Build failed due to linking error.

xecronix said...

I don't mind cleaning up this post a bit and creating a "Compile Instructions for Linux" wiki page. I think the place to link such a page would be from the Downloads page under the title "From Source-code". I'll work on that later today.

Thanks for your help.

You inspired me to redo the downloads wiki page completely. I started a mockup that would have a separate download page for each operating system, one for SCM download, and one for documentation download.

You wiki for compiling would end up being linked from SCM download.

Details to be worked out...


Did you locate (or try) the RPM provided by Michael Moore? https://sourceforge.net/projects/rapideuphoria/files/Euphoria/4.1.0-beta2/

_tom

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

8. Re: Build failed due to linking error.

_tom said...

Did you locate (or try) the RPM provided by Michael Moore? https://sourceforge.net/projects/rapideuphoria/files/Euphoria/4.1.0-beta2/

_tom

I did locate/try the RPM but it failed (as RPMs often do) because of dependency issues. In this case the dependency was eui. Which is of course what I was hoping the RPM would provide. :)

[ronald@localhost Downloads]$ sudo rpm -ivh OpenEuphoria-4.1.0.b2.el7-1.x86_64.rpm  
error: Failed dependencies: 
	/usr/bin/eui is needed by OpenEuphoria-4.1.0.b2.el7-1.x86_64 
[ronald@localhost Downloads]$  

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

9. Re: Build failed due to linking error.

xecronix said...

I did locate/try the RPM but it failed (as RPMs often do) because of dependency issues. In this case the dependency was eui. Which is of course what I was hoping the RPM would provide. :)

thanks

I edited the wiki to reflect this

_tom

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

10. Re: Build failed due to linking error.

This thread was upgraded to a wiki page.

How to Compile Open Euphoria On Linux

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

Search



Quick Links

User menu

Not signed in.

Misc Menu