new topic     » topic index » view thread      » older message » newer message
-- Euc.ex 
constant USAGE = sprintf("%s", {""" 

   eui Euc.ex appname.ex     -- default compile with only one core utilized 
   eui Euc.ex appname.ex x   -- where x is the number of jobs/cores to utilize 
   Euc appname.ex x          -- if Euc.ex is compiled/bound/shrouded and  
                              -- placed in bin directory 

include std/filesys.e 
include std/convert.e 
include std/text.e 
include std/console.e 
integer CORES     
constant CORES_MAX = 8  -- system dependent 
sequence cmd, appname, appname_mak, COMPILE 
cmd = command_line()  
if length(cmd)<3 then 
elsif length(cmd)>=3 then 
   appname = cmd[3] 
   COMPILE = filebase(appname) 
end if 
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_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 Mullins! 
end if 
system("upx "&COMPILE) 
--  Based on ghaberak's compile script from OpenEuForum. 
--  euc -build-dir build -extra-lflags="-no-pie" -makefile appname.ex  
--  make -j8 -f appname.mak -C build  
--  "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"  
--  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.  

Compiling  98% db_tools.c 
Linking 100% ../budget_builder 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `power': 
be_runtime.c:(.text+0x4061): undefined reference to `__powl_finite' 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `Dpower': 
be_runtime.c:(.text+0x40dc): undefined reference to `__powl_finite' 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `e_log': 
be_runtime.c:(.text+0x417f): undefined reference to `__log_finite' 
/usr/bin/ld: /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `De_log': 
be_runtime.c:(.text+0x41c1): undefined reference to `__log_finite' 
collect2: error: ld returned 1 exit status 
Unable to link /home/ken/euprogs/bank_book/budget_builder 
Status: 1 Command: gcc -o /home/ken/euprogs/bank_book/budget_builder  init-.o budget_builder.o main-.o eds.o types.o convert.o search.o text.o error.o filesys.o datetime.o dll.o machine.o memory.o get.o io.o scinot.o math.o sequence.o sort.o wildcard.o pretty.o console.o eumem.o graphcst.o get_datetime.o reg_graphics.o graphics.o register.o xbackup.o db_tools.o   /home/ken/euphoria-4.1.0-Linux-x64/bin/eu.a -m64 -ldl -lm -lpthread -no-pie 

Any suggestions will be deeply appreciated..

Regards, Ken

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


Quick Links

User menu

Not signed in.

Misc Menu