1. Build problem, Mac OSX

Context: Mac OS X 10.6.8 2.16 GHz Intel Core 2 Duo

$ uname -a 
Darwin Bassano.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 

gcc  -m32  -c -Wall -DEUNIX     -fsigned-char -ffast-math -fomit-frame-pointer  -DESIMPLE_MALLOC  -DARCH=ix86   -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/include be_decompress.c -o/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o 
In file included from alldefs.h:2, 
                 from be_decompress.c:3: 
execute.h:225:26: error: linux/limits.h: No such file or directory 
make[2]: *** [/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o] Error 1 
make[1]: *** [interpreter] Error 2 
make: *** [all] Error 2 
 

What to do?

Kind regards, Bugmagnet.

new topic     » topic index » view message » categorize

2. Re: Build problem, Mac OSX

bugmagnet said...

Context: Mac OS X 10.6.8 2.16 GHz Intel Core 2 Duo

$ uname -a 
Darwin Bassano.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 

gcc  -m32  -c -Wall -DEUNIX     -fsigned-char -ffast-math -fomit-frame-pointer  -DESIMPLE_MALLOC  -DARCH=ix86   -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/include be_decompress.c -o/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o 
In file included from alldefs.h:2, 
                 from be_decompress.c:3: 
execute.h:225:26: error: linux/limits.h: No such file or directory 
make[2]: *** [/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o] Error 1 
make[1]: *** [interpreter] Error 2 
make: *** [all] Error 2 
 

What to do?

Kind regards, Bugmagnet.

Change line 222 of execute.h from

#ifdef EBSD 

to

#ifdef EOSX 

or maybe even

#if defined(EBSD) || defined EOSX) 
new topic     » goto parent     » topic index » view message » categorize

3. Re: Build problem, Mac OSX

Thanks, that got me another bit further. Now I have the following

gcc  -m32  -c -Wall -DEUNIX     -fsigned-char -ffast-math -fomit-frame-pointer  -DESIMPLE_MALLOC  -DARCH=ix86   -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/include be_decompress.c -o/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o 
In file included from alldefs.h:2, 
                 from be_decompress.c:3: 
execute.h:225:26: error: linux/limits.h: No such file or directory 
make[2]: *** [/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o] Error 1 
make[1]: *** [interpreter] Error 2 
make: *** [all] Error 2 

So is EOSX defined in the source somewhere or should I come in as -DEOSX ?

I now have that part of execute.h reading as

#ifdef EUNIX 
#if defined(EBSD) || defined(EOSX)  
#include <limits.h> 
#else 
#include <linux/limits.h> 
#endif 
#else 
#include <limits.h> 
#endif 

The fact that it's still trying to find linux/limits.h suggests that EOSX isn't defined at that point.

Kind regards,
Bruce.

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

4. Re: Build problem, Mac OSX

bugmagnet said...

Thanks, that got me another bit further. Now I have the following

gcc  -m32  -c -Wall -DEUNIX     -fsigned-char -ffast-math -fomit-frame-pointer  -DESIMPLE_MALLOC  -DARCH=ix86   -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/include be_decompress.c -o/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o 
In file included from alldefs.h:2, 
                 from be_decompress.c:3: 
execute.h:225:26: error: linux/limits.h: No such file or directory 
make[2]: *** [/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o] Error 1 
make[1]: *** [interpreter] Error 2 
make: *** [all] Error 2 

So is EOSX defined in the source somewhere or should I come in as -DEOSX ?

I now have that part of execute.h reading as

Kind regards, Bruce.

It should have come in as -DEOSX and -DEBSD in addition to -DEUNIX and I'm not sure why it didn't. Something remains unexplained here.

Still, I think we can workaround it. Try this out in execute.h:

#ifdef EUNIX 
#ifdef ELINUX 
#include <linux/limits.h> 
#else 
#include <limits.h> 
#endif 
#else 
#include <limits.h> 
#endif 

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

5. Re: Build problem, Mac OSX

Ok, next issue

gcc  -m32  -c -Wall -DEUNIX     -fsigned-char -ffast-math -fomit-frame-pointer  -DESIMPLE_MALLOC  -DARCH=ix86   -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/include be_main.c -o/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_main.o 
be_main.c:23:30: error: linux/limits.h: No such file or directory 
make[2]: *** [/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_main.o] Error 1 
make[1]: *** [interpreter] Error 2 
make: *** [all] Error 2 

Probably has something to do with the preamble in be_main.c, viz

#include <stdio.h> 
#include <time.h> 
#ifdef EWINDOWS 
#  include <windows.h> 
#  include <limits.h> 
#endif 
#ifdef EUNIX 
#  include <unistd.h> 
#  ifdef EBSD 
#    include <limits.h> 
#  else 
#    include <linux/limits.h> 
#  endif 
#  include <sys/types.h> 
#  include <sys/stat.h> 
#else 
#  ifdef EMINGW 
#    include <sys/types.h> 
#    include <sys/stat.h> 
#  else 
#    include <sys\types.h> 
#    include <sys\stat.h> 
#  endif 
#  if !defined(EMINGW) 
#    include <i86.h> 
#    include <bios.h> 
#    include <graph.h> 
#  endif 
#endif 

Kind regards,
Bugmagnet

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

6. Re: Build problem, Mac OSX

bugmagnet said...

Ok, next issue

gcc  -m32  -c -Wall -DEUNIX     -fsigned-char -ffast-math -fomit-frame-pointer  -DESIMPLE_MALLOC  -DARCH=ix86   -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back -I /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/include be_main.c -o/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_main.o 
be_main.c:23:30: error: linux/limits.h: No such file or directory 
make[2]: *** [/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_main.o] Error 1 
make[1]: *** [interpreter] Error 2 
make: *** [all] Error 2 

Probably has something to do with the preamble in be_main.c, viz

#include <stdio.h> 
#include <time.h> 
#ifdef EWINDOWS 
#  include <windows.h> 
#  include <limits.h> 
#endif 
#ifdef EUNIX 
#  include <unistd.h> 
#  ifdef EBSD 
#    include <limits.h> 
#  else 
#    include <linux/limits.h> 
#  endif 
#  include <sys/types.h> 
#  include <sys/stat.h> 
#else 
#  ifdef EMINGW 
#    include <sys/types.h> 
#    include <sys/stat.h> 
#  else 
#    include <sys\types.h> 
#    include <sys\stat.h> 
#  endif 
#  if !defined(EMINGW) 
#    include <i86.h> 
#    include <bios.h> 
#    include <graph.h> 
#  endif 
#endif 

Kind regards,
Bugmagnet

This should be the last one. Change it to:

#include <stdio.h> 
#include <time.h> 
#ifdef EWINDOWS 
#  include <windows.h> 
#  include <limits.h> 
#endif 
#ifdef EUNIX 
#  include <unistd.h> 
#  ifdef ELINUX 
#    include <linux/limits.h> 
#  else 
#    include <limits.h> 
#  endif 
#  include <sys/types.h> 
#  include <sys/stat.h> 
#else 
#  ifdef EMINGW 
#    include <sys/types.h> 
#    include <sys/stat.h> 
#  else 
#    include <sys\types.h> 
#    include <sys\stat.h> 
#  endif 
#  if !defined(EMINGW) 
#    include <i86.h> 
#    include <bios.h> 
#    include <graph.h> 
#  endif 
#endif 

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

7. Re: Build problem, Mac OSX

Right, well that got me through compilation. Next problem is in linkage: a missing library, which I assume to be the Linux library, libnsl - Name services library.

gcc  /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/0rror.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/backend.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/block.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/buildsys.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/c_decl.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/c_out.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/cmdline.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/cominit.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/common.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/compile.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/compress.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/console.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/convert.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/coverage.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/datetime.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/dll.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/eds.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/emit.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/error.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/eumem.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/filesys.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/fwdref.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/get.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/global.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/info.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/init-.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/init-0.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/inline.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/int.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/intinit.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/io.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/keylist.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/locale.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/machine.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/main-.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/main.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/map.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/math.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/memconst.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/memory.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/mode.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/msgtext.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/parser.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/pathopen.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/platform.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/preproc.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/pretty.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/primes.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/regex.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/scanner.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/scinot.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/search.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/sequence.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/shift.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/sort.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/symtab.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/text.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/types.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/utils.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/wildcard.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_decompress.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_execute.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_task.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_main.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_alloc.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_callc.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_inline.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_machine.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_pcre.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_rterror.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_syncolor.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_runtime.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_symtab.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_socket.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/intobj/back/be_w.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_chartables.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_compile.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_config.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_dfa_exec.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_exec.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_fullinfo.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_get.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_globals.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_info.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_maketables.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_newline.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_ord2utf8.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcreposix.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_refcount.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_study.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_tables.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_try_flipped.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_ucd.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_valid_utf8.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_version.o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/pcre/pcre_xclass.o -lm -ldl -lresolv -lnsl -pthread   -m32 -o /Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/eui 
ld: library not found for -lnsl 
collect2: ld returned 1 exit status 
make[2]: *** [/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build/eui] Error 1 
make[1]: *** [interpreter] Error 2 
make: *** [all] Error 2 

Kind regards,
Bugmagnet/Bruce

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

8. Re: Build problem, Mac OSX

bugmagnet said...

Right, well that got me through compilation. Next problem is in linkage: a missing library, which I assume to be the Linux library, libnsl - Name services library.

Kind regards,
Bugmagnet/Bruce

It's not linux/gnu specific - but Darwin doesn't have it (or need it). The easiest way to work around this is to delete all references to "-lnsl" in Makefile.gnu

I wonder why we're seeing this issue, however. What does your config.gnu look like?

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

9. Re: Build problem, Mac OSX

jimcbrown said...

What does your config.gnu look like?

time:source bruceaxtens$ cat config.gnu 
# File generated from configure 
CONFIGURE_PARAMS= 
ARCH=ix86 
EOSX=1 
EOPENBSD= 
ELINUX= 
EMINGW= 
EDJGPP= 
EUPHORIA=1 
TRANSLATE=eui ec.ex 
CC=gcc 
SCP=scp -C 
SSH=ssh -C 
HG=hg 
TRUNKDIR=/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5 
BUILDDIR=/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build 
CYPTRUNKDIR=/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5 
CYPBUILDDIR=/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build 
XLTTARGETCC=gcc 
NO_CYGWIN= 
VERSION=4.0.5 
 

Bruce.

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

10. Re: Build problem, Mac OSX

Seems to be building okay now.

Changed line 83 in Makefile.gnu from
LDLFLAG=-ldl -lresolv -lnsl
to
LDLFLAG=-ldl -lresolv

With thanks,
Bruce.

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

11. Re: Build problem, Mac OSX

Looks like we have a bug in configure. For OSX, we should be setting "EBSD"=1" but we aren't even mentioning it in config.gnu!

bugmagnet said...
jimcbrown said...

What does your config.gnu look like?

time:source bruceaxtens$ cat config.gnu 
# File generated from configure 
CONFIGURE_PARAMS= 
ARCH=ix86 
EOSX=1 
EOPENBSD= 
ELINUX= 
EMINGW= 
EDJGPP= 
EUPHORIA=1 
TRANSLATE=eui ec.ex 
CC=gcc 
SCP=scp -C 
SSH=ssh -C 
HG=hg 
TRUNKDIR=/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5 
BUILDDIR=/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build 
CYPTRUNKDIR=/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5 
CYPBUILDDIR=/Users/bruceaxtens/Downloads/euphoria-OSX-4.0.5/source/build 
XLTTARGETCC=gcc 
NO_CYGWIN= 
VERSION=4.0.5 
 

Bruce.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu