gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] configure and make failed on FreeBSD


From: Camm Maguire
Subject: Re: [Gcl-devel] configure and make failed on FreeBSD
Date: 31 Oct 2002 23:20:38 -0500

Hi GOTO!


GOTO Kentaro <address@hidden> writes:

> Hi, 
> 
> With previous patches and some additional changes attached below, 
> I got raw_gcl but saved_gcl was not created as follows:
> 
>   echo " (in-package \"USER\")(system:save-system \"saved_gcl\")" >>foo
>   ./raw_gcl ./ -libdir /usr/home/gotoken/savannah/gcl/ < foo
>   GCL (GNU Common Lisp)  April 1994  32768 pages
>   Building symbol table for ./raw_gcl ..
>   loading ./../lsp/export.lsp
>   Initializing defmacro.o
>   Can't open file ~s

I think your SEEK_TO_END_OFILE macro is bad.  Please try this one from
linux.h:

/* Seeking to the end of ELF data is a little messy... */
#include <link.h>
#define SEEK_TO_END_OFILE(fp)\
  do { \
        long offset = 0, endofelf; int j; \
        ElfW(Ehdr) eheader; ElfW(Shdr) shdr; \
        fseek(fp, 0, SEEK_SET); \
        fread(&eheader, sizeof(eheader), 1, fp); \
  /* in case the headers themselves come AFTER the actual sections */ \
        endofelf=offset = eheader.e_shoff+ eheader.e_shentsize 
*eheader.e_shnum;\
        fseek(fp, eheader.e_shoff, SEEK_SET); \
        if ( eheader.e_shentsize != sizeof(ElfW(Shdr)) ) \
          { FEerror("Bad ELF section header size",0); } \
        for ( j = 0; j < eheader.e_shnum; j++ ) \
          { fread(&shdr,eheader.e_shentsize,1,fp); \
            if ( (shdr.sh_offset > offset) && (shdr.sh_type != SHT_NOBITS) ) \
              { offset = shdr.sh_offset; endofelf = offset+shdr.sh_size; } \
          } \
        if ( fseek(fp, endofelf, SEEK_SET) ) \
            FEerror("Bad ELF file",0); \
      } while(0)


Also, if you could post your full configure and make output, that
would help.


> Index: h/ptable.h
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/h/ptable.h,v
> retrieving revision 1.4
> diff -u -r1.4 ptable.h
> --- h/ptable.h        12 Jul 2002 22:00:48 -0000      1.4
> +++ h/ptable.h        30 Oct 2002 10:27:46 -0000
> @@ -50,6 +50,8 @@
>  #ifdef SPECIAL_RSYM
>  struct string_address_table c_table;
>  #else
> +#include "bfd.h"
> +#include "bfdlink.h"


This should be unnecessary.  The headers are included if found where
needed elswhere. 



>  static struct bfd_link_info link_info;
>  #endif
>  struct string_address_table combined_table;
> Index: unixport/rsym.c
> ===================================================================
> RCS file: /cvsroot/gcl/gcl/unixport/rsym.c,v
> retrieving revision 1.2
> diff -u -r1.2 rsym.c
> --- unixport/rsym.c   25 Jul 2002 21:49:47 -0000      1.2
> +++ unixport/rsym.c   30 Oct 2002 10:27:49 -0000
> @@ -59,9 +59,8 @@
>  them out to a file together with their addresses */
>  static char *outfile;
>  
> -main(argc,argv)
> -int argc ;
> -char *argv[];
> +int
> +main(int argc, char **argv, char **env)

Your compiler should also never get here, as the SPECIAL_RSYM file
should be defined whenever using RSYM (i.e. no bfd).  But its a good
cleanup anyway.  

Take care,


>  {
>    if (argc!=3) {perror("bad arg count");
>               fflush(stdout);
> @@ -80,7 +79,7 @@
>       unsigned int i;
>       FILE *fp;
>       int string_size=0;
> -     extern char *malloc();
> +     extern void *malloc();
>          
>       fp = fopen(filename, RDONLY);
>       
> 
> #end of patch
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]