Re: Compile broken after upgrading to Ubuntu 18.04 LTS

new topic     » goto parent     » topic index » view thread      » older message » newer message
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.


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 
   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.


new topic     » goto parent     » topic index » view thread      » older message » newer message


Quick Links

User menu

Not signed in.

Misc Menu