pg_dump.o(.text+0xf82): undefined reference to `getopt_long'
pg_dump.o(.text+0xf82): undefined reference to `getopt_long'
От:
Vicki Brown <vlb@cfcl.com>
Дата:
uname -a FreeBSD cfcl.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000 jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC i386 ========================================================== perl -v This is perl, v5.6.1 built for i386-freebsd ========================================================== perl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=freebsd, osvers=4.2-release, archname=i386-freebsd uname='freebsd cfcl.com 4.2-release freebsd 4.2-release #0: mon nov 20 13:02:55 gmt 2000 jkh@bento.freebsd.org:usrsrcsyscompilegeneric i386 ' config_args='-Umymalloc -Dinstallusrbinperl -des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include', optimize='-O', cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-E -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lbind -lm -lc -lcrypt -lutil perllibs=-lbind -lm -lc -lcrypt -lutil libc=, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-DPIC -fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under freebsd Compiled at May 14 2002 00:06:28 @INC: /usr/local/lib/perl5/5.6.1/i386-freebsd /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl ========================================================== the version of PostgreSQL - 7.2.1 ========================================================== and the version of pgsql_perl5 This is version 1.8.0 of pgsql_perl5 (previously called pg95perl5). as included in the PostgreSQL - 7.2.1 distribution. ========================================================== What I did: I ran ./configure --with-perl gmake I got to a point that complained about getopt.h: file not found I located /usr/src/contrib/binutils/include/getopt.h and copied it to /usr/include I ran gmake again I eventually got this error: gmake[3]: Entering directory `/usr/ports/databases/postgresql7/work/postgresql-7.2.1/src/bin/pg_dump' ... cc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pg_dump.o common.o pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o pg_backup_null.o pg_backup_tar.o -L../../../src/interfaces/libpq -lpq -R/usr/local/pgsql/lib -lz -lbind -lcrypt -lcompat -lm -lutil -lreadline -o pg_dump pg_dump.o: In function `main': pg_dump.o(.text+0xf82): undefined reference to `getopt_long' gmake[3]: *** [pg_dump] Error 1 gmake[3]: Leaving directory getopt_long is defined in the getopt.h I copied. Suggestions? -- - Vicki Vicki Brown ZZZ Journeyman Sourceror: P.O. Box 1269 zz |\ _,,,---,,_ Scripts & Philtres San Bruno, CA zz /,`.-'`' -. ;-;;,_ Perl, Unix, MacOS 94066 USA |,4- ) )-,_. ,\ ( `'-' mailto:vlb@cfcl.com '---''(_/--' `-'\_) http://www.cfcl.com/~vlb
Re: pg_dump.o(.text+0xf82): undefined reference to
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Vicki Brown writes: > I ran > ./configure --with-perl > gmake > > I got to a point that complained about > getopt.h: file not found I would like to see the exact output on the screen together with some context. Not having a getopt.h file is not necessarily a reason for failure. > I located > /usr/src/contrib/binutils/include/getopt.h > and copied it to /usr/include You can't just copy files around and hope things will work. > pg_dump.o: In function `main': > pg_dump.o(.text+0xf82): undefined reference to `getopt_long' > gmake[3]: *** [pg_dump] Error 1 > gmake[3]: Leaving directory ... 'coz they won't. > getopt_long is defined in the getopt.h I copied. Declared, not defined. That's the problem. -- Peter Eisentraut peter_e@gmx.net
Re: pg_dump.o(.text+0xf82): undefined reference to
От:
Vicki Brown <vlb@cfcl.com>
Дата:
Yes, I realized all of this after I hit send. I'm going to upgrade FreeBSD to a more recent version... At 21:58 +0200 6/4/02, Peter Eisentraut wrote: >Vicki Brown writes: > >> I ran >> ./configure --with-perl >> gmake >> >> I got to a point that complained about >> getopt.h: file not found > >I would like to see the exact output on the screen together with some >context. Not having a getopt.h file is not necessarily a reason for >failure. > >> I located >> /usr/src/contrib/binutils/include/getopt.h >> and copied it to /usr/include > >You can't just copy files around and hope things will work. > >> pg_dump.o: In function `main': >> pg_dump.o(.text+0xf82): undefined reference to `getopt_long' >> gmake[3]: *** [pg_dump] Error 1 >> gmake[3]: Leaving directory > >... 'coz they won't. > >> getopt_long is defined in the getopt.h I copied. > >Declared, not defined. That's the problem. > >-- >Peter Eisentraut peter_e@gmx.net -- - Vicki Vicki Brown ZZZ Journeyman Sourceror: P.O. Box 1269 zz |\ _,,,---,,_ Scripts & Philtres San Bruno, CA zz /,`.-'`' -. ;-;;,_ Perl, Unix, MacOS 94066 USA |,4- ) )-,_. ,\ ( `'-' mailto:vlb@cfcl.com '---''(_/--' `-'\_) http://www.cfcl.com/~vlb