Thread: compilation error

compilation error

From
"Daniel A. Melo"
Date:
Hi ALL,

My Configure

"./configure --with-perl --with-odbc"

generated this messages:

creating cache ./config.cache
checking host system type... i586-pc-linux-gnu
checking echo setting...
checking setting template to... linux_i386
checking whether to support locale... disabled
checking whether to support cyrillic recode... disabled
checking whether to support multibyte... disabled
checking setting DEF_PGPORT... 5432
checking setting DEF_MAXBACKENDS... 32
checking setting USE_TCL... disabled
checking setting USE_PERL... enabled
checking setting USE_ODBC... enabled
checking setproctitle... disabled
checking setting ODBCINST...
checking setting ASSERT CHECKING... disabled
checking for gcc... gcc
checking whether the C compiler (gcc -O2 ) works... yes
checking whether the C compiler (gcc -O2 ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
- setting CPPFLAGS=
- setting LDFLAGS=
checking setting debug compiler flag... using default
checking for c++... c++
checking whether the C++ compiler (c++   ) works... yes
checking whether the C++ compiler (c++   ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for include <string> in C++... no
checking for class string in C++... no
checking for a BSD compatible install... /usr/bin/install -c
checking for flex... flex
checking for yywrap in -lfl... yes
checking whether ln -s works... yes
checking whether make sets ${MAKE}... yes
checking for ranlib... ranlib
checking for find... /usr/bin/find
checking for tar... /bin/tar
checking for split... /usr/bin/split
checking for etags... /usr/bin/etags
checking for xargs... /usr/bin/xargs
checking for gzcat... no
checking for zcat... /bin/zcat
checking for perl... perl
checking for bison... /usr/bin/bison
- Using /usr/bin/bison -y -d
checking for main in -lsfio... no
checking for main in -lncurses... yes
checking for main in -ltermcap... yes
checking for main in -lreadline... yes
checking for using_history in -lreadline... yes
checking for main in -lbsd... yes
checking for main in -lutil... yes
checking for main in -lm... yes
checking for main in -ldl... yes
checking for main in -lsocket... no
checking for main in -lnsl... yes
checking for main in -lipc... no
checking for main in -lIPC... no
checking for main in -llc... no
checking for main in -ldld... no
checking for main in -lln... no
checking for main in -lld... no
checking for main in -lcompat... no
checking for main in -lBSD... no
checking for main in -lcrypt... yes
checking for main in -lgen... no
checking for main in -lPW... no
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for arpa/inet.h... no
checking for crypt.h... yes
checking for dld.h... no
checking for endian.h... yes
checking for float.h... yes
checking for fp_class.h... no
checking for getopt.h... yes
checking for history.h... no
checking for ieeefp.h... no
checking for limits.h... no
checking for netdb.h... no
checking for netinet/in.h... no
checking for readline.h... no
checking for readline/history.h... yes
checking for readline/readline.h... yes
checking for sys/select.h... yes
checking for termios.h... yes
checking for unistd.h... yes
checking for values.h... no
checking for sys/param.h... no
checking for pwd.h... yes
checking for working const... yes
checking for inline... inline
checking for preprocessor stringizing operator... yes
checking for uid_t in sys/types.h... yes
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for tm_zone in struct tm... yes
checking for signed types... yes
checking for volatile... yes
checking for type of last arg to accept... int
checking for int timezone... yes
checking for gettimeofday args... 2 args
checking for union semun... no
checking for fcntl(F_SETLK)... no
checking for 8-bit clean memcmp... yes
checking return type of signal handlers... void
checking for vprintf... yes
checking for memmove... yes
checking for sysconf... yes
checking for sigprocmask... yes
checking for waitpid... yes
checking for setsid... yes
checking for fcvt... yes
checking for fpclass... no
checking for fp_class... no
checking for fp_class_d... no
checking for class... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for isinf... yes
checking for getrusage... yes
checking for srandom... yes
checking for gethostname... yes
checking for random... yes
checking for inet_aton... yes
checking for strerror... yes
checking for strdup... yes
checking for strtol... yes
checking for strtoul... yes
checking for strcasecmp... yes
checking for cbrt... yes
checking for rint... yes
checking for filename_completion_function... yes
checking for getopt_long... yes
checking for finite... yes
checking for sigsetjmp... yes
checking whether 'long int' is 64 bits... no
checking whether 'long long int' is 64 bits... yes
checking whether snprintf handles 'long long int' as %lld... yes
checking alignment of short... 2
checking alignment of int... 4
checking alignment of long... 4
checking alignment of long long int... 4
checking alignment of double... 4
checking for POSIX signal interface... yes
checking for tclsh... /usr/bin/tclsh
checking for pwd.h... (cached) yes
updating cache ./config.cache
creating ./config.status
creating GNUmakefile
creating Makefile.global
creating backend/port/Makefile
creating backend/catalog/genbki.sh
creating backend/utils/Gen_fmgrtab.sh
creating bin/pg_dump/Makefile
creating bin/pg_version/Makefile
creating bin/pgtclsh/mkMakefile.tcldefs.sh
creating bin/pgtclsh/mkMakefile.tkdefs.sh
creating bin/psql/Makefile
creating include/version.h
creating interfaces/libpq/Makefile
creating interfaces/ecpg/lib/Makefile
creating interfaces/ecpg/preproc/Makefile
creating interfaces/libpq++/Makefile
creating interfaces/libpgeasy/Makefile
creating interfaces/libpgtcl/Makefile
creating interfaces/odbc/GNUmakefile
creating interfaces/odbc/Makefile.global
creating pl/plpgsql/src/Makefile
creating pl/plpgsql/src/mklang.sql
creating pl/tcl/mkMakefile.tcldefs.sh
creating test/regress/GNUmakefile
creating include/config.h
linking ./backend/port/dynloader/linux.c to backend/port/dynloader.c
linking ./backend/port/dynloader/linux.h to include/dynloader.h
linking ./include/port/linux.h to include/os.h
linking ./makefiles/Makefile.linux to Makefile.port
linking ./backend/port/tas/dummy.s to backend/port/tas.s
linking ./include/port to interfaces/odbc/port
linking ./makefiles to interfaces/odbc/makefiles
linking ./template to interfaces/odbc/template
linking ./include/config.h to interfaces/odbc/config.h


...and my  make generated these:

In file included from
/usr/lib/gcc-lib/i386-conectiva-linux/2.95.3/include/syslimits.h:7,
                 from
/usr/lib/gcc-lib/i386-conectiva-linux/2.95.3/include/limits.h:11,
                 from ../../../include/utils/timestamp.h:18,
                 from ../../../include/utils/nabstime.h:18,
                 from ../../../include/access/xact.h:18,
                 from ../../../include/utils/tqual.h:19,
                 from ../../../include/access/relscan.h:17,
                 from ../../../include/access/heapam.h:19,
                 from heaptuple.c:23:
/usr/lib/gcc-lib/i386-conectiva-linux/2.95.3/include/limits.h:117:
limits.h: Arquivo ou diretório não encontrado
make[3]: *** [heaptuple.o] Error 1
make[2]: *** [submake] Error 2
make[1]: *** [access.dir] Error 2
make: *** [all] Error 2

The line 117 from limits.h has:

#ifndef _GCC_NEXT_LIMITS.H
#include_next <limits.h>...

What should i do???????


[]´s

Daniel A.




Re: [GENERAL] Re: compilation error

From
"Daniel A. Melo"
Date:
OK,
thanks for help-me.

Now my initdb has some problem:

ERROR:  Error: unknown type 'ame'.

ERROR:  Error: unknown type 'ame'.

ERROR:  Error: unknown type 'ame'.

ERROR:  Error: unknown type 'ame'.

/usr/local/pgsql/bin/initdb: line 481:  1053 Falha de segmentação
"$PGPATH"/postgres $BACKENDARGS template1 <"$TEMPFILE"

[]´s

Daniel A.



"J.H.M. Dassen (Ray)" wrote:

> Daniel A. Melo <daniel@codata.com.br> wrote:
> >/usr/lib/gcc-lib/i386-conectiva-linux/2.95.3/include/limits.h:117:
> >limits.h: Arquivo ou diretório não encontrado
>
> I'll assume that's "no such file or directory".
>
> >The line 117 from limits.h has:
> >
> >#ifndef _GCC_NEXT_LIMITS.H
> >#include_next <limits.h>...
> >
> >What should i do???????
>
> Install the package that contains /usr/include/limits.h . On my Debian
> GNU/Linux system, that's the "libc6-dev" .deb; on RPM-based systems I think
> it's called glibc-dev.rpm.
>
> HTH,
> Ray
> --
> "My golden rule of computing is reboot your system every morning."
>         Jon C.A. DeKeles, Technical Director, ZDNet AnchorDesk
>         in http://www.zdnet.com/anchordesk/story/story_4100.html
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html


Re: Re: [GENERAL] Re: compilation error

From
Tom Lane
Date:
"Daniel A. Melo" <daniel@codata.com.br> writes:
> Now my initdb has some problem:

> ERROR:  Error: unknown type 'ame'.

Ah, you must be on one of the platforms that doesn't like those
extraneous backslashes in src/backend/catalog/genbki.sh.  Apply
this patch:

*** pgsql/src/backend/catalog/genbki.sh 2000/10/28 22:14:14     1.18
--- pgsql/src/backend/catalog/genbki.sh 2001/01/16 22:48:34     1.19
***************
*** 161,170 ****
  ;g' | # we must run a new sed here to see the newlines we added
  sed -e "s/;[  ]*$//g" \
      -e "s/^[  ]*//" \
!     -e "s/[   ]Oid/\ oid/g" \
!     -e "s/[   ]NameData/\ name/g" \
      -e "s/^Oid/oid/g" \
!     -e "s/^NameData/\name/g" \
      -e "s/(NameData/(name/g" \
      -e "s/(Oid/(oid/g" \
      -e "s/NAMEDATALEN/$NAMEDATALEN/g" \
--- 161,170 ----
  ;g' | # we must run a new sed here to see the newlines we added
  sed -e "s/;[  ]*$//g" \
      -e "s/^[  ]*//" \
!     -e "s/[   ]Oid/ oid/g" \
!     -e "s/[   ]NameData/ name/g" \
      -e "s/^Oid/oid/g" \
!     -e "s/^NameData/name/g" \
      -e "s/(NameData/(name/g" \
      -e "s/(Oid/(oid/g" \
      -e "s/NAMEDATALEN/$NAMEDATALEN/g" \

then re-run 'make all' and 'make install' in src/backend.

            regards, tom lane

Initdb error

From
"Daniel A. Melo"
Date:
Hi All,
Hi Ray,
Thanks for help,

i typed  "sh -x /path/to/initdb" e here are the messages that make no sense to
me:

++ basename /usr/local/pgsql/bin/initdb
+ CMDNAME=initdb
+ '[' '' ']'
+ TEMPFILE=/tmp/initdb.1070
+ echo '\c'
+ grep -s c
+ ECHO_N=echo -n
+ ECHO_C=
+ echo /usr/local/pgsql/bin/initdb
+ grep /
++ echo /usr/local/pgsql/bin/initdb
++ sed 's,/[^/]*$,,'
+ PGPATH=/usr/local/pgsql/bin
+ '[' '!' -x /usr/local/pgsql/bin/postgres ']'
+ '[' '!' -x /usr/local/pgsql/bin/pg_version ']'
+ '[' '!' -x /usr/local/pgsql/bin/pg_id ']'
++ /usr/local/pgsql/bin/pg_id -n -u
+ EffectiveUser=postgres
+ '[' -z postgres ']'
++ /usr/local/pgsql/bin/pg_id -u
+ '[' 562 -eq 0 ']'
+ MULTIBYTEID=0
+ MULTIBYTE=
+ debug=0
+ noclean=0
+ template_only=0
+ show_setting=0
+ POSTGRES_SUPERUSERNAME=postgres
++ /usr/local/pgsql/bin/pg_id -u
+ POSTGRES_SUPERUSERID=562
+ '[' 2 -gt 0 ']'
+ PGDATA=/usr/local/pgsql/data
+ shift
+ shift
+ '[' 0 -gt 0 ']'
+ '[' '' ']'
+ '[' '' ']'
+ '[' -z /usr/local/pgsql/data ']'
+ echo /usr/local/pgsql/data
+ grep '^/'
+ '[' 0 -ne 0 ']'
+ '[' -z '' ']'
+ '[' -f /usr/local/pgsql/bin/../lib/global1.bki.source ']'
+ PGLIB=/usr/local/pgsql/bin/../lib
+ break
+ '[' -z /usr/local/pgsql/bin/../lib ']'
+ TEMPLATE=/usr/local/pgsql/bin/../lib/local1_template1.bki.source
+ GLOBAL=/usr/local/pgsql/bin/../lib/global1.bki.source
+ PG_HBA_SAMPLE=/usr/local/pgsql/bin/../lib/pg_hba.conf.sample
+ TEMPLATE_DESCR=/usr/local/pgsql/bin/../lib/local1_template1.description
+ GLOBAL_DESCR=/usr/local/pgsql/bin/../lib/global1.description
+ PG_GEQO_SAMPLE=/usr/local/pgsql/bin/../lib/pg_geqo.sample
+
PG_POSTMASTER_OPTS_DEFAULT_SAMPLE=/usr/local/pgsql/bin/../lib/postmaster.opts.default.sample

+ '[' 0 -eq 1 ']'
+ '[' '!' -f /usr/local/pgsql/bin/../lib/local1_template1.bki.source ']'
+ '[' '!' -f /usr/local/pgsql/bin/../lib/global1.bki.source ']'
+ '[' '!' -f /usr/local/pgsql/bin/../lib/pg_hba.conf.sample ']'
+ '[' 0 -ne 0 ']'
+ '[' 0 -eq 0 ']'
+ '[' 0 -ne 0 ']'
+ '[' 0 -ne 0 ']'
+ trap 'echo "Caught signal." ; exit_nicely' 1 2 3 15
+ echo 'This database system will be initialized with username "postgres".'
+ echo 'This user will own all the data files and must also own the server
process.'
+ echo
+ umask 077
+ '[' -f /usr/local/pgsql/data/PG_VERSION ']'
+ '[' '!' -d /usr/local/pgsql/data ']'
+ echo 'Creating database system directory /usr/local/pgsql/data'
+ mkdir /usr/local/pgsql/data
+ '[' '!' -d /usr/local/pgsql/data/base ']'
+ echo 'Creating database system directory /usr/local/pgsql/data/base'
+ mkdir /usr/local/pgsql/data/base
+ '[' '!' -d /usr/local/pgsql/data/pg_xlog ']'
+ echo 'Creating database XLOG directory /usr/local/pgsql/data/pg_xlog'
+ mkdir /usr/local/pgsql/data/pg_xlog
+ rm -rf /usr/local/pgsql/data/base/template1
+ mkdir /usr/local/pgsql/data/base/template1
+ '[' 0 -eq 1 ']'
+ BACKEND_TALK_ARG=-Q
+ BACKENDARGS=-boot -C -F -D/usr/local/pgsql/data -Q
+ FIRSTRUN=-boot -x -C -F -D/usr/local/pgsql/data -Q
+ echo 'Creating template database in /usr/local/pgsql/data/base/template1'
+ '[' 0 -ne 0 ']'
+ cat /usr/local/pgsql/bin/../lib/local1_template1.bki.source
+ sed -e s/PGUID/562/g
+ /usr/local/pgsql/bin/postgres -boot -x -C -F -D/usr/local/pgsql/data -Q
template1
ERROR:  Error: unknown type 'ame'.

ERROR:  Error: unknown type 'ame'.

+ /usr/local/pgsql/bin/pg_version /usr/local/pgsql/data/base/template1
+ '[' 0 -eq 0 ']'
+ echo 'Creating global relations in /usr/local/pgsql/data/base'
+ '[' 0 -ne 0 ']'
+ cat /usr/local/pgsql/bin/../lib/global1.bki.source
+ sed -e s/POSTGRES/postgres/g -e s/PGUID/562/g
+ /usr/local/pgsql/bin/postgres -boot -C -F -D/usr/local/pgsql/data -Q
template1
ERROR:  Error: unknown type 'ame'.

ERROR:  Error: unknown type 'ame'.

+ /usr/local/pgsql/bin/pg_version /usr/local/pgsql/data
+ cp /usr/local/pgsql/bin/../lib/pg_hba.conf.sample
/usr/local/pgsql/data/pg_hba.conf
+ cp /usr/local/pgsql/bin/../lib/pg_geqo.sample
/usr/local/pgsql/data/pg_geqo.sample
+ cp /usr/local/pgsql/bin/../lib/postmaster.opts.default.sample
/usr/local/pgsql/data/postmaster.opts.default
+ echo 'Adding template1 database to pg_database'
+ echo 'open pg_database'
+ echo 'insert (template1 562 0 template1)'
+ echo 'close pg_database'
+ '[' 0 -ne 0 ']'
+ /usr/local/pgsql/bin/postgres -boot -C -F -D/usr/local/pgsql/data -Q
template1
/usr/local/pgsql/bin/initdb: line 481:  1100 Falha de segmentação    (core
dumped) "$PGPATH"/postgres $BACKENDARGS template1 <"$TEMPFILE"
+ retval=139
+ rm -f /tmp/initdb.1070
+ '[' 139 -ne 0 ']'
+ exit_nicely
+ stty echo
+ echo
+ echo 'initdb failed.'
+ '[' 0 -eq 0 ']'
+ echo 'Removing /usr/local/pgsql/data.'
+ rm -rf /usr/local/pgsql/data
+ echo 'Removing temp file /tmp/initdb.1070.'
+ rm -rf /tmp/initdb.1070
+ exit 1

][]´s

Daniel A.





Re: Re: [GENERAL] Re: compilation error

From
"Daniel A. Melo"
Date:
Hi All,

It worked!

Thanks for all that helped me!

I hope that these answers may help others novice users!

[]´s

Daniel A.



Tom Lane wrote:

> "Daniel A. Melo" <daniel@codata.com.br> writes:
> > Now my initdb has some problem:
>
> > ERROR:  Error: unknown type 'ame'.
>
> Ah, you must be on one of the platforms that doesn't like those
> extraneous backslashes in src/backend/catalog/genbki.sh.  Apply
> this patch:
>
> *** pgsql/src/backend/catalog/genbki.sh 2000/10/28 22:14:14     1.18
> --- pgsql/src/backend/catalog/genbki.sh 2001/01/16 22:48:34     1.19
> ***************
> *** 161,170 ****
>   ;g' | # we must run a new sed here to see the newlines we added
>   sed -e "s/;[  ]*$//g" \
>       -e "s/^[  ]*//" \
> !     -e "s/[   ]Oid/\ oid/g" \
> !     -e "s/[   ]NameData/\ name/g" \
>       -e "s/^Oid/oid/g" \
> !     -e "s/^NameData/\name/g" \
>       -e "s/(NameData/(name/g" \
>       -e "s/(Oid/(oid/g" \
>       -e "s/NAMEDATALEN/$NAMEDATALEN/g" \
> --- 161,170 ----
>   ;g' | # we must run a new sed here to see the newlines we added
>   sed -e "s/;[  ]*$//g" \
>       -e "s/^[  ]*//" \
> !     -e "s/[   ]Oid/ oid/g" \
> !     -e "s/[   ]NameData/ name/g" \
>       -e "s/^Oid/oid/g" \
> !     -e "s/^NameData/name/g" \
>       -e "s/(NameData/(name/g" \
>       -e "s/(Oid/(oid/g" \
>       -e "s/NAMEDATALEN/$NAMEDATALEN/g" \
>
> then re-run 'make all' and 'make install' in src/backend.
>
>                         regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)