1. Compile broken after upgrading to Ubuntu 18.04 LTS

gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

ken@ken-desktop:~/euphoria-4.1.0-Linux-x64/bin$ euc search.ex 
Build directory: build-277472/ 
Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11  generating 
Compiling with GCC 
Compiling   2% init-.c 
~ 
Compiling  97% eumem.c 
Linking 100% ../search 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_machine.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_w.o): relocation R_X86_64_32 against undefined symbol `screen_image' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_alloc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_pcre.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_socket.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_task.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_callc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(pcre_compile.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(pcre_exec.o): relocation R_X86_64_32 against symbol `_pcre_default_tables' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(pcre_fullinfo.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC 
/usr/bin/ld: final link failed: Nonrepresentable section on output 
collect2: error: ld returned 1 exit status 
Unable to link /home/ken/euphoria-4.1.0-Linux-x64/bin/search 
Status: 1 Command: gcc -o /home/ken/euphoria-4.1.0-Linux-x64/bin/search  init-.o search.o main-.o get.o machine.o memory.o dll.o types.o text.o convert.o 0earch.o filesys.o datetime.o sequence.o sort.o wildcard.o scinot.o graphics.o eumem.o   /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a -m64 -ldl -lm -lpthread 
ken@ken-desktop:~/euphoria-4.1.0-Linux-x64/bin$  
 

new topic     » topic index » view message » categorize

2. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

I get a similar error when trying to compile in Ubuntu 18.04. Ubuntu did not even have gcc, nor allow me to install gcc, without some deep searching on the web to find half a dozen "solutions" which didn't work. Once I found one which allowed me to install gcc, and build-essential, I got the same error as you did.

I wish I could be more help, but all I can say is that this works out of the box with Linux Mint. And since Mint is an offshoot of Ubuntu, with the broken parts fixed, then it's possible to also fix Ubuntu - but I won't be trying that.

Ubuntu, like Microsoft, has apparently decided that computers are "content delivery systems", no longer usable for "computing".

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

3. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

I get a similar error when trying to compile in Ubuntu 18.04. Ubuntu did not even have gcc, nor allow me to install gcc, without some deep searching on the web to find half a dozen "solutions" which didn't work. Once I found one which allowed me to install gcc, and build-essential, I got the same error as you did.

I wish I could be more help, but all I can say is that this works out of the box with Linux Mint. And since Mint is an offshoot of Ubuntu, with the broken parts fixed, then it's possible to also fix Ubuntu - but I won't be trying that.

Ubuntu, like Microsoft, has apparently decided that computers are "content delivery systems", no longer usable for "computing".

Thanks for the feedback, Irv.

I have already downloaded Mint 19.2 and will install it as soon as I have everything backed up.

Regards, Ken

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

4. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

In between my previous post and now, I have installed Mint 19.2 Tina in a triple-boot machine, and am using this now to post. After installing, I had to do the following:

sudo apt-get update
sudo apt-get install gcc (should already be latest)
sudo apt-get install build-essential (not installed by default)

This fails with the same error. Mint 18 works fine. I guess I'm sticking with 18.

EDIT: I've -perhaps - found the solution here: https://stackoverflow.com/questions/46827433/g-compile-error-rodata-can-not-be-used-when-making-a-shared-object-recomp

However, I certainly don't have the skill to make this work. Somebody?

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

5. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

However, I certainly don't have the skill to make this work. Somebody?

As of Ubuntu 17.10, their GCC uses -fPIE (position independent executable) as the default over -fPIC (position independent code). You just need to add -extra-lflags="-no-pie" to the command line.

euc -extra-lflags="-no-pie" search.ex 

We may have to add a bit to the translator to check for this somehow and provide precompiled PIE and PIC libraries, or always emit -no-pie to just use PIC.

-Greg

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

6. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

ghaberek said...
irv said...

However, I certainly don't have the skill to make this work. Somebody?

As of Ubuntu 17.10, their GCC uses -fPIE (position independent executable) as the default over -fPIC (position independent code). You just need to add -extra-lflags="-no-pie" to the command line.

euc -extra-lflags="-no-pie" search.ex 

We may have to add a bit to the translator to check for this somehow and provide precompiled PIE and PIC libraries, or always emit -no-pie to just use PIC.

-Greg

This works with plain text Euphoria, e.g. puts(1,"Hello World!"), but fails to compile even a one-liner that uses GtkEngine.e:

include GtkEngine.e 

Segmentation fault (core dumped)

The problem is probably in EuGTK, but finding it will be a hassle.

So, for now, compiling EuGTK programs is out (not that it is really necessary, bound programs work fine, and bind is so much faster than compiling).

EDIT:

Good(ish) news, I found the (or one of the) problems, which can be fixed easily: in or around line 224 in GtkEngine.e, where it assigns app_name = , change the line to match the one below:

	runt_dir = gtk_str_func("g_get_user_runtime_dir"),  
	app_name = filename(cmd[2]), -- update this one 
	prg_name = find_app(), 
	def_lang = gtk_func("gtk_get_default_language"), 

Having done this, several programs now compile and run correctly. However, to test all 250 or more will take some time!

I now have an 8-core processor. Is there any way to make euc use several of those, rather than just one?

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

7. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

I now have an 8-core processor. Is there any way to make euc use several of those, rather than just one?

There sure is! You can compile your translated apps in a fraction of the time.

euc -build-dir build -extra-lflags="-no-pie" -makefile appname.ex 
make -j8 -f appname.mak -C build 

euc options

  • -build-dir - use the named directory (default is build-[random number])
  • -extra-lflags - required on Ubuntu 17.10+ as discussed previously
  • -makefile - generate a makefile instead of compiling directly (will be named [build-dir]/[basename].mak)

make options

  • -j (or --jobs) - use this many simultaneous jobs (usually one job per core/thread)
  • -f (or --file) - use the specified makefile (default is Makefile)
  • -C (or --directory) - change to the specified directory before doing anything

This works on Windows or Linux. Only difference is you need to use mingw32-make instead of just make on Windows.

-Greg

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

8. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Great! Thanks.

By the way, I have compiled successfully nearly all of the 250 demo programs (left it running overnight).

The simple one-line mod to EuGTK mentioned earlier is all that was needed.

BTW, I suppose WEE's compile function will need to be modified, also.

C.K.Lester was kind enough to reorganize and rename all those test[n] programs so that the program names are more meaningful.

I will post a new version of EuGTK just as soon as I can match the docs to the new names.

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

9. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

Ubuntu did not even have gcc, nor allow me to install gcc, without some deep searching on the web to find half a dozen "solutions" which didn't work.

What??? :) Sorry, but it must be something really wrong with your system if you couldn't install gcc and build-essentials with a couple of lines in the terminal. Linux distro not allowing to install gcc? Are you sure it wasn't just a bad dream? Don't get me wrong, but it sounds insane.

EDIT I'm not using anything Ubuntu-based at the moment, so I can't be 100% sure, but that can't be true. No. :)

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

10. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Pirx said...
irv said...

Ubuntu did not even have gcc, nor allow me to install gcc, without some deep searching on the web to find half a dozen "solutions" which didn't work.

What??? :) Sorry, but it must be something really wrong with your system if you couldn't install gcc and build-essentials with a couple of lines in the terminal. Linux distro not allowing to install gcc? Are you sure it wasn't just a bad dream? Don't get me wrong, but it sounds insane.

EDIT I'm not using anything Ubuntu-based at the moment, so I can't be 100% sure, but that can't be true. No. :)

Well, I can't see how anything could have gone wrong, since I just installed directly from the download. Neither Ubuntu 18.04 nor Mint 19 (Tina), downloaded yesterday, come with gcc installed, but Mint allows you to apt-get it easily enough.

Ubuntu forgot to include the repos for gcc, so you have to edit hidden files manually to add them. Ubuntu also does not allow you to associate *.ex programs with Euphoria (eui) without a great hassle editing hidden text files and disabling another editor. Mint allows that just by right clicking, selecting properties/open with, and choosing eui. Ubuntu 18 disables the open with button. Only Ubuntu "approved" programs can be associated with your files.

Pretty sad, really.

The latest EuGTK includes an html file: demos/documentation/eu_on_ubuntu.html which has details on setting up Ubuntu to open *.ex (and all text/plain mime type files) with eui, by stealing them from gedit.

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

11. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

Ubuntu also does not allow you to associate *.ex programs with Euphoria (eui) without a great hassle editing hidden text files and disabling another editor. Mint allows that just by right clicking, selecting properties/open with, and choosing eui. Ubuntu 18 disables the open with button. Only Ubuntu "approved" programs can be associated with your files.

Why would anyone want to associate *.ex files with eui on Linux? All you need is a shebang with a path to eui at the beginning of your script and make the script executable. Then you will be able to run your script from the file manager by double clicking on its icon. Also you will be able to run it from the terminal without calling eui and if you place it in your bin directory then you won't have to even type a full path or call it within the directory it's placed. You can also add the directory with your Euphoria scripts to PATH and there will be no need to move/copy them to your bin directory. Another thing - you can remove the extension and call the script by its name only.

Gcc on Ubuntu. Well, it must have been a bug or you must have done something wrong. After updating your repositories, simple sudo apt install build-essentials should install gcc and everything required for compiling. Canonical may be doing strange things to Ubuntu, but not allowing gcc would be purely insane. :)

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

12. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

No. Look it up online - hundreds of questions about how to fix these two things.

And gcc would not load on Ubuntu because the repository was not included. Plenty of complaints about that, also.

User-written scripts in the bin directory? Not even /usr/local/bin, not going there, but thanks anyway.

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

13. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

User-written scripts in the bin directory? Not even /usr/local/bin, not going there, but thanks anyway.

Of course, I meant /usr/local/bin. Sorry, I should have been more clear. But, you don't have to move them anywhere. Just make them executable + shebang and you will be able to run them from your file manager. And if you add the directory with Euphoria scripts to PATH then they will work like there were in /usr/local/bin. Just wanted to help and show how to do it on Linux properly. :)

I believe that there was problem with Ubuntu repositories. But no more gcc on Ubuntu? Not possible. :)

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

14. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Pirx said...
irv said...

User-written scripts in the bin directory? Not even /usr/local/bin, not going there, but thanks anyway.

I believe that there was problem with Ubuntu repositories. But no more gcc on Ubuntu? Not possible. :)

Note that it isn't impossible to get gcc on Ubuntu, it's just not intuitive. Or installed automatically with the distro, as it used to be.

It's nearly as much trouble as setting up a working compiler for Windows 10. Neither should be a big deal, but the prevailing attitude at both Microsoft and Ubuntu is that people want just an entertainment box.

But I have a TV for that. I bought a computer because I can tell it what to do (at least for now).

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

15. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

I understand your position, but I disagree.

1. 99% of users want just "an entertainment box" and including advanced stuff with every machine wouldn't make any sense.

2. I prefer to start with a minimal distribution and then "build" my own system. If there is an option to do so, I always choose "minimal installation".

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

16. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

ghaberek said...
irv said...

I now have an 8-core processor. Is there any way to make euc use several of those, rather than just one?

There sure is! You can compile your translated apps in a fraction of the time.

euc -build-dir build -extra-lflags="-no-pie" -makefile appname.ex 
make -j8 -f appname.mak -C build 

euc options

  • -build-dir - use the named directory (default is build-[random number])
  • -extra-lflags - required on Ubuntu 17.10+ as discussed previously
  • -makefile - generate a makefile instead of compiling directly (will be named [build-dir]/[basename].mak)

make options

  • -j (or --jobs) - use this many simultaneous jobs (usually one job per core/thread)
  • -f (or --file) - use the specified makefile (default is Makefile)
  • -C (or --directory) - change to the specified directory before doing anything

This works on Windows or Linux. Only difference is you need to use mingw32-make instead of just make on Windows.

-Greg

I have been trying to write a little command line replacement program for euc to use until the developer(s) create a proper fix, but I am having problems passing a j value to the make command:

-- Euc.ex 
 
include std/filesys.e 
include std/convert.e 
 
sequence cmd, appname, appname_mak 
integer CORES = 1,  -- default 
CORES_MAX = 8  -- system dependent 
 
cmd = command_line()  
 
if length(cmd) = 4 then 
   CORES = to_number(cmd[4]) 
   if CORES > CORES_MAX then 
      CORES = CORES_MAX 
   end if 
end if   
 
if length(cmd) >=3 then 
    appname = cmd[3] 
    appname_mak = filebase(appname)&".mak" 
    system_exec("euc -build-dir build -extra-lflags=\"-no-pie\" -makefile"&' '&appname)  
    system ("make -j8 -f"&' '&appname_mak&' '&" -C build")  -- works 
    --system("make -j"&CORES&' '&"-f"&' '&appname_mak&' '&" -C build") -- fails 
    -- fails with message: "make: the '-j' option requires a positive integer argument" 
end if 

Suggestions will be appreciated.

Regards,

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

17. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

I would try this:

 system(text:format("make -j[] -f []_mak -C build",{CORES,appname})) 
  
 -- might require filename(appname) or whatever to remove path and extension. 
new topic     » goto parent     » topic index » view message » categorize

18. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

I would try this:

 system(text:format("make -j[] -f []_mak -C build",{CORES,appname})) 
  
 -- might require filename(appname) or whatever to remove path and extension. 

Ok, Thanks ... This works:

#!/home/ken/euphoria-4.1.0-Linux-x64/bin/eui 
-- 
--  For Ubuntu  based Linux distributions since 17.10 
 
--  Euc.ex  <== compile and place in the Euphoria bin directory. 
--  passes flags to compiler necessary to compile Euphoria programs 
-- also allows passing a number  of jobs flag to compiler: 
 
-- usage:  
--  eui Euc.ex search.ex 8     -- where 8 is the number of jobs/cores to utilize 
--  Euc search.ex 8                -- if Euc.ex is compiled and placed in bin directory       
--  eui Euc.ex search.ex        -- default compile with only one core utilized 
 
--  Based on ghaberak's compile script from OpenEuForum: 
--  https://openeuphoria.org/forum/m/134187.wc 
--  euc -build-dir build -extra-lflags="-no-pie" -makefile appname.ex  
--  make -j8 -f appname.mak -C build  
 
--  https://openeuphoria.org/forum/m/134183.wc 
--  As of Ubuntu 17.10, their GCC uses -fPIE (position independent executable)  
--  as the default over -fPIC (position independent code).  
--  You just need to add -extra-lflags="-no-pie" to the command line.  
--  euc -extra-lflags="-no-pie" search.ex  
 
include std/filesys.e 
include std/convert.e 
include std/text.e 
 
sequence cmd, appname, appname_mak 
integer CORES = 1,  -- default 
CORES_MAX = 8  -- system dependent 
 
cmd = command_line()  
if length(cmd) = 3 then 
   system_exec("euc -extra-lflags=\"-no-pie\""&' '& cmd[3]) 
elsif length(cmd) = 4 then 
   CORES = to_number(cmd[4]) 
   if CORES > CORES_MAX then CORES = CORES_MAX end if 
    appname = cmd[3] 
    appname_mak = filebase(appname)&".mak" 
    system_exec("euc -build-dir build -extra-lflags=\"-no-pie\" -makefile"&' '&appname)  
    system(text:format("make -j[] -f [] -C build",{CORES,appname_mak})) -- Thanks Irv! 
end if 

Thanks, Ken

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

19. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

Well, I can't see how anything could have gone wrong, since I just installed directly from the download. Neither Ubuntu 18.04 nor Mint 19 (Tina), downloaded yesterday, come with gcc installed, but Mint allows you to apt-get it easily enough.

Weird. I downloaded and installed the server version of Ubuntu Bionic (18.04.2) and it came with gcc installed.

irv said...

Ubuntu forgot to include the repos for gcc, so you have to edit hidden files manually to add them.

Again, apt-get seems to work for me. You said other people have reported this, but I can't find any references on the web. If you have any links about the problem, I'd be interested in reading them.

irv said...

Ubuntu also does not allow you to associate *.ex programs with Euphoria (eui) without a great hassle editing hidden text files and disabling another editor. Mint allows that just by right clicking, selecting properties/open with, and choosing eui. Ubuntu 18 disables the open with button. Only Ubuntu "approved" programs can be associated with your files.

Pretty sad, really.

Since I'm using the server version I can't test this. But I can't find any references on the web, the closest is https://askubuntu.com/questions/1030019/ but that refers to the developmental version of Bionic (so I'm guessing before the official release).

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

20. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

https://askubuntu.com/questions/1080043/how-to-install-gcc-in-ubuntu-18-04

It's not that complicated, once you discover that to install gcc, you don't. You install build-essential.

@Videonauth In Ubuntu 18.04 gcc is not installed by default – Arun Oct 1 '18 at 16:04

You should first run sudo apt update then sudo apt install build-essential – Arun Oct 1 '18 at 16:02

https://askubuntu.com/questions/tagged/file-association

Plenty of questions going back several years. That indicates that Ubuntu intends for it to work that way.

Sadly, many of the methods suggested to fix this just don't work. Pretty frustrating, when Mint does it correctly, out of the box.

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

21. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

https://askubuntu.com/questions/1080043/how-to-install-gcc-in-ubuntu-18-04

It's not that complicated, once you discover that to install gcc, you don't. You install build-essential.

@Videonauth In Ubuntu 18.04 gcc is not installed by default – Arun Oct 1 '18 at 16:04

You should first run sudo apt update then sudo apt install build-essential – Arun Oct 1 '18 at 16:02

I can see how they got here. A typical desktop environment doesn't really need to come with development tools out of the box.

I've become so accustomed to installing build-essential instead of just gcc and other packages, that I often try it on other distros and am disappointed when it doesn't exist.

irv said...

https://askubuntu.com/questions/tagged/file-association

Plenty of questions going back several years. That indicates that Ubuntu intends for it to work that way.

Sadly, many of the methods suggested to fix this just don't work. Pretty frustrating, when Mint does it correctly, out of the box.

While I can see needing this for documents and other data, I don't really see the appeal for program files. Wouldn't adding a shebang and exec rights be a better approach?

-Greg

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

22. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

ghaberek said...

While I can see needing this for documents and other data, I don't really see the appeal for program files. Wouldn't adding a shebang and exec rights be a better approach?

-Greg

Well, no. If I do that, then when I click on the program icon, I get a pop-up dialog that says:

"browser.ex" is an executable program, do you want to: Run in Terminal, Display, Cancel, Run?

Run In Terminal and Run buttons do run the program as expected, but Display loads the default text editor, which is not WEE on Ubuntu.

So, just running the program takes an extra, useless step, and if I decide to edit, I have to cancel, select and use a right-click to choose WEE.

If I can set "Open With" as desired i.e. Open With eui, then clicking runs the program without the extra dialog. Regardless of whether there's a shebang or executable permission. Ubuntu disallows this option.

Either way, my choice of editor is right there with a right mouse click.

Often I will swap the defaults, so that clicking .ex files always opens them in WEE, if I'm doing a lot of editing. For testing, swap it back to eui. Again, something not "allowed" on Ubuntu.

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

23. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

https://askubuntu.com/questions/1080043/how-to-install-gcc-in-ubuntu-18-04

It's not that complicated, once you discover that to install gcc, you don't. You install build-essential.

Ah, I see. It's probably a difference between server and desktop editions.

irv said...

https://askubuntu.com/questions/tagged/file-association

Plenty of questions going back several years. That indicates that Ubuntu intends for it to work that way.

Ah, interesting. Based on the launchpad issue, it sounds like this isn't Ubuntu but GNOME: https://bugs.launchpad.net/hundredpapercuts/+bug/1413283

irv said...

Sadly, many of the methods suggested to fix this just don't work. Pretty frustrating, when Mint does it correctly, out of the box.

Probably because Mint has moved to Cinamon instead of GNOME: linuxmint.com/download.php linuxhint.com/linux_mint_cinnamon_vs_mate/

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

24. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Yep, it's those darn meddling Gnomes again!

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

25. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

ghaberek said...

I've become so accustomed to installing build-essential instead of just gcc and other packages, that I often try it on other distros and am disappointed when it doesn't exist.

Exactly. From my experience, installing developpment tools has always been easier on Ubuntu-based distros than on other ones. Also, GCC alone wouldn't be enough - you need to install a lot more to be able to compile stuff. That's why having something like build-essential is a pretty good idea.

The question how to run your program makes perfect sense as running terminal scripts without terminal doesn't really make sense. Three clicks instead of two don't make that much difference. When you editing and testing your programs you should be running them directly from your editor. I use Geany and can run/compile/bind Euphoria code with one click. So, what you do is editing/saving the file and then switching to your file manager to run them by double clicking? Then you should definitely try other editors. Also, Ubuntu Mate would be probably a better option for you.

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

26. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

I don't write terminal mode programs. That's so 1980's.

I use either WEE or my own BEAR editor to edit and run programs, as you suggest. BEAR works better for me, because both Euphoria and GTK documents are in html form, and BEAR can find and display the relevant doc pages right beside my source code edit window.

Wee works almost as well, and is better in some respects (having multi-tab editing for include files, for example). That's something I could add to the BEAR if I were so inclined.

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

27. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

I don't write terminal mode programs. That's so 1980's.

Nope, it isn't. You seem to be confusing programs and user interfaces. While I agree that writing terminal UIs is generally a thing of the past, there is absolutely nothing wrong with programs that use terminal for input and output. Especially on Linux where these programs can "talk" to each other. Is GCC a GUI program? Also, writing desktop programs is so 90s. :) The first decade of 21st century was all about the web, while this one is all about the web (or the cloud, if you prefer), mobile devices and IoT. ;)

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

28. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

You are right, but does Euphoria do any of those things?

Didn't think so. Perhaps you can contribute something along those lines.

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

29. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Well, I'm happy with writing terminal programs, GUI apps, demos and I think there is still place for all of them. No need to call them "so 80s, 90s, 00s" etc.

The problem you had with associating Euphoria scripts is related to the desktop environment. Switching to other Ubuntu floavour should help.

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

30. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Pirx said...

Well, I'm happy with writing terminal programs, GUI apps, demos and I think there is still place for all of them. No need to call them "so 80s, 90s, 00s" etc.

The problem you had with associating Euphoria scripts is related to the desktop environment. Switching to other Ubuntu floavour should help.

The reason for trying Ubuntu originally was because we had a new Euphoria user recently who was trying to use Ubuntu and learn Euphoria. Half the questions and difficulties were the result of Ubuntu being unfriendly to programmers.

A lot of time was wasted.

Switching to one of the dozens of other, more friendly and "bling free" distros is a better choice for me.

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

31. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

Switching to one of the dozens of other, more friendly and "bling free" distros is a better choice for me.

I'm wondering if we should declare something like "Linux Mint is the recommended distro for Euphoria on Linux!" or "OpenEuphoria recommends Linux Mint!"

-Greg

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

32. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

ghaberek said...
irv said...

Switching to one of the dozens of other, more friendly and "bling free" distros is a better choice for me.

I'm wondering if we should declare something like "Linux Mint is the recommended distro for Euphoria on Linux!" or "OpenEuphoria recommends Linux Mint!"

-Greg

Remember, we're trying to remain apolitical. grin

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

33. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

ghaberek said...

I'm wondering if we should declare something like "Linux Mint is the recommended distro for Euphoria on Linux!" or "OpenEuphoria recommends Linux Mint!"

Only if you can make Mint's developers to include OpenEuphoria. Otherwise you will have people complaining that "They recommend Mint, but OpenEuphoria isn't pre-installed. It's not even in the repositories!" blink

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

34. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Pirx said...

Also, GCC alone wouldn't be enough - you need to install a lot more to be able to compile stuff. That's why having something like build-essential is a pretty good idea.

They could make a GCC package alias so that it automatically tries to install build-essential if one tries to install gcc - that probably does the right thing most of the time.

Alternatively, they could go a little bit softer and say "gcc not found - suggested: did you mean to try apt install build-essentials"

Just saying GCC not found without any additional hints is not very user friendly.

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

35. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

ghaberek said...
irv said...

Switching to one of the dozens of other, more friendly and "bling free" distros is a better choice for me.

I'm wondering if we should declare something like "Linux Mint is the recommended distro for Euphoria on Linux!" or "OpenEuphoria recommends Linux Mint!"

-Greg

I'm cool with this.

euphoric said...

Remember, we're trying to remain apolitical. grin

This doesn't have to be political - just a statement that the developers have tried X and find it works well with OE. We aren't limited to declaring only one distro.

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

36. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

jimcbrown said...

Just saying GCC not found without any additional hints is not very user friendly.

GCC itself is not very user friendly and finding/installing it on Ubuntu is definitely easier than using it. Your argument doesn't make sense. GCC is a tool for advanced computer users who should be able to read the documentation, use online resources and solve minor problems. This whole topic sounds like an option to install/use GCC on Ubuntu has been removed, while in fact what we have here is a very minor isue and solving it shouldn't be a problem for any developper/advanced user.

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

37. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Pirx said...

Your argument doesn't make sense.

I think it does. Let me elaborate below.

Pirx said...

GCC is a tool for advanced computer users

There might be some reasonable differences between our definition of "advanced" but I see gcc as a tool for non-developer power users who don't need to know any C at all but still want to install gcc so they can follow guides like https://wiki.winehq.org/Building_Wine (say if they wanted to build and run the bleeding edge version of Wine).

Pirx said...

GCC is a tool for advanced computer "C developers" who should be able to read the documentation, use online resources and solve minor problems.

Even in this case, there is a scenario where the user interface fails. An advance computer user, who is not a GNU/Linux power user but comes from a related background (say an old Solaris or HP/UX hat), who is trying to set up Ubuntu on a system in a place that lacks internet connectivity. (How does this person install new packages if there's no internet connectivity? They've got a DVD of everything.)

If this person knew that they should install build-essentials instead of gcc, then they'd be all set. But, without access to ubuntu forums or stackoverflow, how are they to know?

Pirx said...

GCC itself is not very user friendly

Agreed, though I'd argue that's the case for using any C compiler. tongue

You want a user friendly language, then use OE or Phix.

Pirx said...

and finding/installing it on Ubuntu is definitely easier than using it.

Agreed.

Pirx said...

This whole topic sounds like an option to install/use GCC on Ubuntu has been removed, while in fact what we have here is a very minor isue

Agreed in the sense that gcc has not been removed outright from Ubuntu.

Pirx said...

and solving it shouldn't be a problem for any developper/advanced user.

Ehh... I can someday see Ubuntu going to use package names like "wine-essentials" or "office-essentials" and then users on forums asking why "apt install wine" and "apt-get install libreoffice" don't work anymore.

In other words, you are mostly correct but I see a good argument here in generalizing this issue in a way to make a change that will make the Ubuntu command line more user friendly in the future.

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

38. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

Could we please address the original problem? And that is: what once worked, no longer does. (And for an unknown number of would-be new Eu users, never did, I might add.)

When I went to the OpenEuphoria.org home page this morning, I was greeted with this (in a little box):

Can be interpreted or compiled:  
    $ eui hello.ex  
    Hello, World!  
    $ euc hello.ex  
    Building... gcc -o hello hello.c  
    $ ./hello  
    Hello, World!  

Ok,

C:\Users\Irv\demos>euc hello.ex 
Build directory: build-622614\ 
Translating code, pass: 1 2 3 generating  
Compiling with GCC 
Compiling 14% init-.c 
Couldn't compile file 'init-.c' 
Status -1 Command:gcc -DEWINDOWS -fomit-frame-pointer -c -w -fsigned-char -o2 -m64 -IC:/Euphoria -ffast-math init-.c 

Well, of course Windows 10 doesn't come with gcc, or any compiler. I should know that, being an experienced systems programmer who just happens to be looking for a simple-easy-to-use programming language, right?

So I join the beginners, and read the Eu manual, where I find:

6.4.2 C Compilers Supported

The Translator currently works with GNU C on Unix-like OSes, GNU C on Windows from MinGW or Cygwin using the -gcc option and with Watcom C (the default) on Windows. These are all free compilers.

GNU C will exist already on your Unix system. The others can be downloaded from their respective Web sites.

...

I guess the underlined part is no longer correct, depending upon how recent a version of Linux you have.

But that's not a problem. All you guys who slop the hogs at the server farm know how to install gcc, right? Why shouldn't a rank beginner who has just found an "easy to use" programming language that "you can compile" be able to do that too?

So once the rank beginner gets a geek friend to install gcc, all is good, right? Maybe, maybe not. Depends upon how recent a version of Linux you have. As well as which distro. See the original 2 posts for confirmation.

Summary: it would be good if there was a Euphoria webpage which

  • Supplies step-by-step instructions for the Windows users
  • Warns about changes necessary when using MinGW or Cygwin or Watcom (do they all still work?)
  • Provides information for Linux users about installing gcc
  • Warns about changes which prevent euc from working in the latest Linux versions
  • Provides scripts to fix that problem.

And perhaps make some recommendations based on actual experience with what works for the type of programmer who would be interested in using Euphoria.

Granted, that information can be found buried somewhere in this forum, but it if you don't know what you're looking for, you're not likely to find it.

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

39. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

So once the rank beginner gets a geek friend to install gcc, all is good, right? Maybe, maybe not. Depends upon how recent a version of Linux you have. As well as which distro. See the original 2 posts for confirmation.

Could we please address the original problem? And that is: what once worked, no longer does.

  • Warns about changes which prevent euc from working in the latest Linux versions
  • Provides scripts to fix that problem.

By this, you mean the no piie issue? I think that's a bug in the Eu translator, which should be ticketed and fixed (instead of just documenting a workaround).

irv said...

(And for an unknown number of would-be new Eu users, never did, I might add.)

Agreed. This is not good.

irv said...

I guess the underlined part is no longer correct, depending upon how recent a version of Linux you have.

The verbage should be updated to make clear that gcc might have to be installed through the distro's package manager (but that was already the case, back in the 1990s muLinux didn't come with gcc by default either, so this isn't a new thing).

irv said...

Summary: it would be good if there was a Euphoria webpage which

  • Supplies step-by-step instructions for the Windows users
  • Warns about changes necessary when using MinGW or Cygwin or Watcom (do they all still work?)
  • Provides information for Linux users about installing gcc

Watcom no longer works. Hasn't in years. (For 4.1)

We used to bundle OpenWatcom/MinGW for the Windoze users when making an actual release. Obviously someone still needs to go through and make sure the instructions are updated and still relevant for the latest releases, etc but I think we used to handle this well.

Agree with the bit about having gcc install instructions. Though I think something like "If gcc is not installed, see your distro's package manager instructions for details. Links for instructions to some commonly used distros are provided here:" would be good enough, but I'm open to suggestions for improvements.

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

40. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

You have, no doubt, seen those websites where you answer a series of questions, and eventually are presented with an appropriate option or options based on your answers. I'd like to see that here.

Start with "Do you want to use Euphoria on a Windows computer, a Linux computer, or a computer running OS-X?

Does it have a 32-bit or 64-bit OS (here's how to tell....)

etc.

I wouldn't mind starting such a page, if I could remember the necessary steps. But someone with more experience with Windows would have to help with that part.

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

41. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

irv said...

You have, no doubt, seen those websites where you answer a series of questions, and eventually are presented with an appropriate option or options based on your answers. I'd like to see that here.

Start with "Do you want to use Euphoria on a Windows computer, a Linux computer, or a computer running OS-X?

Does it have a 32-bit or 64-bit OS (here's how to tell....)

etc.

I wouldn't mind starting such a page, if I could remember the necessary steps. But someone with more experience with Windows would have to help with that part.

What do you think of http://phix.x10.mx/download.php

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

42. Re: Compile broken after upgrading to Ubuntu 18.04 LTS

petelomax said...

What do you think of http://phix.x10.mx/download.php

You're just showing off, Pete! haha!

I like it! grin

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

Search



Quick Links

User menu

Not signed in.

Misc Menu