Menu

#2 Won't compile on Unix

open
nobody
None
5
2005-01-21
2005-01-21
Anonymous
No

Many undeclared variables when compiling on unix. For
example executing:

gcc -c main.c

states _MAX_PATH is undeclared. Many files have
undeclared variables that prevent GC to compile on Unix.

Suggest a Makefile and an updated config.h to solve
these issues.

Discussion

  • Hans J. Johnson

    Hans J. Johnson - 2005-02-15

    Logged In: YES
    user_id=716982

    Work is in progress about this issue.

     
  • Gavin Kingsley

    Gavin Kingsley - 2005-03-16

    Logged In: YES
    user_id=365473

    I got the version from CVS to compile and run on Solaris by
    modifying config.h as follows:

    diff -u vendor/Sources//config.h trunk/Sources//config.h
    --- vendor/Sources//config.h Thu Mar 17 11:08:36 2005
    +++ trunk/Sources//config.h Thu Mar 17 11:08:23 2005
    @@ -43,7 +43,7 @@
    #define GC_STRICMP strcasecmp
    #define GC_UNLINK unlink
    #define GC_ACCESS access
    -enum { GC_ACCESS_WRITE_OK=W_OK, GC_S_IWRITE=S_IWUSR };
    +enum { GC_ACCESS_WRITE_OK=W_OK, GC_S_IWRITE=0644 };
    #define GC_CHMOD chmod
    #define GC_STRDATE(value) "NO_DATE"
    #define GC_STRTIME(value) "NO_TIME"
    @@ -50,6 +50,10 @@

    #endif

    +#ifndef PATH_MAX
    +#define PATH_MAX 1024
    +#endif
    +
    #ifndef _MAX_PATH
    #define _MAX_PATH PATH_MAX
    #endif

     
  • J.B. Looney

    J.B. Looney - 2006-04-11

    Logged In: YES
    user_id=1499823

    I downloaded the latest code out of CVS and tried
    compiling it on Unix (IRIX Release 6.5 IP35 and SunOS
    5.9). I made the following two modifications to the
    Makefile to make it work:

    COMPILE.c = gcc
    OUTPUT_OPTION = -c -o $@

    - We don't have the /usr/ucb/cc language option installed,
    hence the change to COMPILE.c to force it to the gcc
    compiler

    - When compiling on the both the Sun and SGI, gcc
    attempted to compile the source files one at a time, and
    kept getting undefined symbols (since the symbols were in
    the other .c files). After generating the
    intermediate .o's, compilation went fine.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.