How to Install Perl 5.10.1 on Ubuntu 14.04? - perl

I've to install Perl 5.10.1 on Ubuntu 14.04 as per my requirement. When I download and install the package I get the following errors,
cc -fstack-protector -L/usr/local/lib -o miniperl \
gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o \
miniperlmain.o opmini.o perlmini.o
pp.o: In function `Perl_pp_pow':
pp.c:(.text+0x2daf): undefined reference to `pow'
pp.o: In function `Perl_pp_modulo':
pp.c:(.text+0x39ee): undefined reference to `floor'
pp.c:(.text+0x3a21): undefined reference to `floor'
pp.c:(.text+0x3d94): undefined reference to `fmod'
pp.o: In function `Perl_pp_atan2':
pp.c:(.text+0x8a05): undefined reference to `atan2'
pp.o: In function `Perl_pp_sin':
pp.c:(.text+0x8ba2): undefined reference to `sin'
pp.o: In function `Perl_pp_int':
pp.c:(.text+0x9061): undefined reference to `floor'
pp.c:(.text+0x90d1): undefined reference to `ceil'
pp.o:(.rodata+0x120): undefined reference to `cos'
pp.o:(.rodata+0x128): undefined reference to `sin'
pp.o:(.rodata+0x130): undefined reference to `sin'
pp.o:(.rodata+0x138): undefined reference to `exp'
pp.o:(.rodata+0x140): undefined reference to `log'
pp.o:(.rodata+0x148): undefined reference to `sqrt'
pp_pack.o: In function `S_pack_rec':
pp_pack.c:(.text+0x72b3): undefined reference to `floor'
pp_pack.c:(.text+0x72d6): undefined reference to `floor'
pp_pack.c:(.text+0x7303): undefined reference to `floor'
collect2: error: ld returned 1 exit status
make: *** [miniperl] Error 1
I tried including math library <math.h> in the file pp.c but of no use. Is there anything more I need to do?
Also please tell me whether there is a tool that converts Perl 5.10.1 Script compatible with Perl 5.18.2 as I get backward compatibility warnings when I compile with 5.18.2.

You could use perlbrew, a program that manages Perl installations.
Install it using apt-get install perlbrew as root
Initialize it by running perlbrew init
Add source ~/perl5/perlbrew/etc/bashrc to your .bashrc and start a new shell.
Install perl 5.10 using perlbrew install perl-5.10.1
You can now use perlbrew use to change the Perl for the current shell, or perlbrew switch to change the Perl globally.
If you only need one Perl and want to avoid the complexity of perlbrew, you can try perl-build.

Tried many things and this worked for me finally :)
Step 1: find your lib path which has all libm* files
In most systems it was under /usr/lib64. Search for the same in your machine
system:/usr/lib64$ ls libm*
libm.a libmcheck.a libmenuw.so.5 libmpc.so.3.0.0 libmpfr.so.4 libmpx.so.0.0.0 libm.so libmvec.a
libmagic.so.1 libmenu.so.5 libmenuw.so.5.9 libmpdec.so.2 libmpfr.so.4.1.4 libmpxwrappers.so.0 libmspack.so.0 libmvec_nonshared.a
libmagic.so.1.0.0 libmenu.so.5.9 libmpc.so.3 libmpdec.so.2.4.2 libmpx.so.0 libmpxwrappers.so.0.0.0 libmspack.so.0.1.0 libmvec.so
Step 2: Use the path with glibpth option while doing configure
./Configure -des -Dglibpth='/lib/lib64 /usr/lib64'
or I see some forums suggested plibpth
./Configure -des -Dplibpth='/lib/lib64 /usr/lib64' -Dglibpth='/lib/lib64 /usr/lib64' -Dlibpth='/lib/lib64 /usr/lib64'

Related

How to use axi dma kernel module in custom application in petalinux?

I am trying to build the axidma-benchmark application with the Xilinx-axidma driver (Github repo) provided by bperez77.
I am using Petalinux 20.2 to build Linux for my custom project.
In the new version of the kernel, some functions are changed and I get some errors when running petalinux-build. I changed the driver files as mentioned here and build the kernel module successfully.
In the following, I create the custom application by running:
petalinux-create -t apps --name axidma-benchmark --enable
Then I copy the application files into the recipes-apps directory and append all C and header files to the SRC_URI List in the axidma-benchmark.bb as:
SRC_URI = "file://axidma-benchmark.c \
file://axidma_ioctl.h \
file://conversion.h \
file://libaxidma.h \
file://util.c \
file://util.h \
file://Makefile \
"
Then I add APP_OBJS += util.o to the Makefile and build the application by running:
petalinux-build -c axidma-benchmark
But I got these errors:
ERROR: axidma-benchmark-1.0-r0 do_compile: oe_runmake failed
ERROR: axidma-benchmark-1.0-r0 do_compile: Execution of '/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/temp/run.do_compile.21635' failed with exit code 1:
aarch64-xilinx-linux-gcc -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot -o axidma-benchmark axidma-benchmark.o util.o -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: axidma-benchmark.o: in function main': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:491: undefined reference to axidma_init'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:499: undefined reference to axidma_malloc' /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:505: undefined reference to axidma_malloc'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:514: undefined reference to axidma_get_vdma_tx' /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:515: undefined reference to axidma_get_vdma_rx'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: axidma-benchmark.o: in function single_transfer_test': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:396: undefined reference to axidma_twoway_transfer'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: axidma-benchmark.o: in function main': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:558: undefined reference to axidma_free'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:560: undefined reference to axidma_free' /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:562: undefined reference to axidma_destroy'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:519: undefined reference to axidma_get_dma_tx' /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:520: undefined reference to axidma_get_dma_rx'
/media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/9.2.0/ld: axidma-benchmark.o: in function time_dma': /usr/src/debug/axidma-benchmark/1.0-r0/axidma-benchmark.c:426: undefined reference to axidma_twoway_transfer'
collect2: error: ld returned 1 exit status
make: *** [Makefile:12: axidma-benchmark] Error 1
WARNING: /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/temp/run.do_compile.21635:1 exit 1 from 'exit 1'
ERROR: Logfile of failure stored in: /media/fpgaws/projects/DevelopmentLab/build/apu/ultrazed7ev/build/tmp/work/aarch64-xilinx-linux/axidma-benchmark/1.0-r0/temp/log.do_compile.21635
What is my mistake?
I have forgotten to add the libaxidma.c files into the file directory. By adding this file application was built successfully.
Update:
You can access the final version of my code via this link.
If you have any problems, please let me know.

libbpf issue: undefined reference to `xsk_umem__create' etc

I am trying to build nff-go and it requires libbpf. But I ended up with below error when run test.
/tmp/go-build107101737/b063/_x002.o: In function `initXDP':
low.cgo2.c:(.text+0x7a09): undefined reference to `xsk_umem__create'
low.cgo2.c:(.text+0x7a5d): undefined reference to `xsk_socket__create'
low.cgo2.c:(.text+0x7a9e): undefined reference to `bpf_get_link_xdp_id'
/tmp/go-build107101737/b063/_x002.o: In function `removeXDP':
low.cgo2.c:(.text+0x7bb5): undefined reference to `xsk_socket__delete'
low.cgo2.c:(.text+0x7bc2): undefined reference to `xsk_umem__delete'
low.cgo2.c:(.text+0x7bd9): undefined reference to `bpf_get_link_xdp_id'
low.cgo2.c:(.text+0x7c1e): undefined reference to `bpf_set_link_xdp_fd'
/tmp/go-build107101737/b063/_x002.o: In function `sendXDP':
low.cgo2.c:(.text+0x8e22): undefined reference to `xsk_socket(float, double)'
I installed libbpf per its github guide by
git clone https://github.com/libbpf/libbpf.git
cd src
make
Now libbpf is installed in /usr/lib64 and it contains the exporting function:
nm -D libbpf.so | grep xsk_umem
0000000000014570 T xsk_umem__create
00000000000153c0 T xsk_umem__delete
0000000000014550 T xsk_umem__fd
I checked get it in ldconfig path as
# ldconfig -v | grep libbpf
ldconfig: Path `/lib64' given more than once
ldconfig: Can't stat /libx32: No such file or directory
ldconfig: Path `/usr/lib' given more than once
ldconfig: Path `/usr/lib64' given more than once
ldconfig: Can't stat /usr/libx32: No such file or directory
libbpf.so.0 -> libbpf.so.0.0.5
Any idea why?
It turns out a bug in nff-go.
It forgets to add -lbpf in compilation script.
Issue 656 is filed for it.
https://github.com/intel-go/nff-go/issues/656

mutt installaiton error on CentOS 6.7

I'm trying to install mutt on CentOS 6.7 and ./configure --prefix=$HOME/local runs fine but at make install step, I run into this error below that I don't know how to solve. I tried with mutt 1.6.1 and 1.6.0 and this same error came up so it's probably some system setting that wasn't correct. How could I fix it?
gcc -std=gnu99 -Wall -pedantic -Wno-long-long -g -O2 -o mutt addrbook.o alias.o attach.o base64.o browser.o buffy.o color.o crypt.o cryptglue.o commands.o complete.o compose.o copy.o curs_lib.o curs_main.o date.o edit.o enter.o flags.o init.o filter.o from.o getdomain.o group.o handler.o hash.o hdrline.o headers.o help.o hook.o keymap.o main.o mbox.o menu.o mh.o mx.o pager.o parse.o pattern.o postpone.o query.o recvattach.o recvcmd.o rfc822.o rfc1524.o rfc2047.o rfc2231.o rfc3676.o score.o send.o sendlib.o signal.o sort.o status.o system.o thread.o charset.o history.o lib.o muttlib.o editmsg.o mbyte.o mutt_idna.o url.o ascii.o crypt-mod.o safe_asprintf.o patchlist.o conststrings.o pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o smime.o crypt-mod-smime-classic.o resize.o -lncursesw -lidn
/opt/gnu/bin/ld: curs_lib.o: undefined reference to symbol 'wtimeout'
/lib64/libtinfo.so.5: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [mutt] Error 1
OK, I somehow fixed it.. not really understand why this fixed it.
After configure, in the Makefile, change the LDFLAGS = line to LDFLAGS = -lncurses -ltinfo, then make install and it solved the issue.
Credit to this post: http://www.pclinuxos.com/forum/index.php?topic=129566.0, Tara-Rain-9.5ß's answer

install opencv for perl (centos)

I'm trying to do face detection on perl, and I found out about OpenCV and the perl module Image::ObjectDetect on CPAN here and here. I've done a clean install of CentOS 6.5 (minimal) on a virtual machine to test this, and then:
yum -y update
yum -y install perl cpan opencv
Ok, and considering I never user cpan before, I tried the obvious (after some short google searches)
perl -MCPAN -e shell
[accept default]
install Image::ObjectDetect
that gave me some errors:
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
After googling about that error, I did:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
mkdir /usr/local/lib/pkgconfig
vi /usr/local/lib/pkgconfig/opencv.pc
the content of the file:
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: opencv
Description: The opencv library
Version: 2.x.x
Cflags: -I${includedir}/opencv -I${includedir}/opencv2
Libs: -L${libdir} -lopencv_calib3d -lopencv_imgproc -lopencv_contrib -lopencv_legacy -l
After I ran the install again, I noticed I was missing gcc:
/bin/sh: gcc: command not found
yum -y install gcc
Running the install again now gives me:
...
Note (probably harmless): No library found for -lopencv_calib3d
Note (probably harmless): No library found for -lopencv_imgproc
Note (probably harmless): No library found for -lopencv_contrib
Note (probably harmless): No library found for -lopencv_legacy
Note (probably harmless): No library found for -l
Writing Makefile for Image::ObjectDetect
Could not read '/root/.cpan/build/Image-ObjectDetect-0.12-BsNNjF/META.yml'. Falling back to other methods to determine prerequisites
cp lib/Image/ObjectDetect.pm blib/lib/Image/ObjectDetect.pm
cp lib/Image/ObjectDetect.xs blib/lib/Image/ObjectDetect.xs
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap ObjectDetect.xs > ObjectDetect.xsc && mv ObjectDetect.xsc ObjectDetect.c
gcc -c -I/usr/include/opencv -I/usr/include/opencv2 -Isrc -I/usr/include/opencv -I/usr/include/opencv2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -DVERSION=\"0.12\" -DXS_VERSION=\"0.12\" -fPIC "-I/usr/lib/perl5/CORE" ObjectDetect.c
In file included from ObjectDetect.xs:7:
/usr/lib/perl5/CORE/cv.h:13: error: redefinition of ‘struct xpvcv’
/usr/lib/perl5/CORE/cv.h:94: error: conflicting types for ‘xpvcv_allocated’
/usr/lib/perl5/CORE/cv.h:94: note: previous declaration of ‘xpvcv_allocated’ was here
ObjectDetect.xs:8:21: error: highgui.h: No such file or directory
ObjectDetect.xs: In function ‘XS_Image__ObjectDetect_new’:
ObjectDetect.xs:19: error: ‘CvHaarClassifierCascade’ undeclared (first use in this function)
ObjectDetect.xs:19: error: (Each undeclared identifier is reported only once
ObjectDetect.xs:19: error: for each function it appears in.)
ObjectDetect.xs:19: error: ‘cascade’ undeclared (first use in this function)
ObjectDetect.xs:22: warning: implicit declaration of function ‘cvLoad’
ObjectDetect.xs: In function ‘XS_Image__ObjectDetect_xs_detect’:
ObjectDetect.xs:37: error: ‘IplImage’ undeclared (first use in this function)
ObjectDetect.xs:37: error: ‘img’ undeclared (first use in this function)
ObjectDetect.xs:37: error: ‘gray’ undeclared (first use in this function)
ObjectDetect.xs:37: warning: left-hand operand of comma expression has no effect
ObjectDetect.xs:39: error: ‘CvMemStorage’ undeclared (first use in this function)
ObjectDetect.xs:39: error: ‘storage’ undeclared (first use in this function)
ObjectDetect.xs:40: error: ‘CvHaarClassifierCascade’ undeclared (first use in this function)
ObjectDetect.xs:40: error: ‘cascade’ undeclared (first use in this function)
ObjectDetect.xs:41: error: ‘CvSeq’ undeclared (first use in this function)
ObjectDetect.xs:41: error: ‘objects’ undeclared (first use in this function)
ObjectDetect.xs:42: error: ‘CvRect’ undeclared (first use in this function)
ObjectDetect.xs:42: error: ‘rect’ undeclared (first use in this function)
ObjectDetect.xs:46: warning: implicit declaration of function ‘cvLoadImage’
ObjectDetect.xs:50: warning: implicit declaration of function ‘cvCreateImage’
ObjectDetect.xs:50: warning: implicit declaration of function ‘cvSize’
ObjectDetect.xs:51: warning: implicit declaration of function ‘cvCvtColor’
ObjectDetect.xs:51: error: ‘CV_BGR2GRAY’ undeclared (first use in this function)
ObjectDetect.xs:52: warning: implicit declaration of function ‘cvEqualizeHist’
ObjectDetect.xs:54: warning: implicit declaration of function ‘cvCreateMemStorage’
ObjectDetect.xs:55: error: expected expression before ‘)’ token
ObjectDetect.xs:56: warning: implicit declaration of function ‘cvHaarDetectObjects’
ObjectDetect.xs:58: error: ‘CV_HAAR_DO_CANNY_PRUNING’ undeclared (first use in this function)
ObjectDetect.xs:65: error: expected expression before ‘)’ token
ObjectDetect.xs:74: warning: implicit declaration of function ‘cvReleaseMemStorage’
ObjectDetect.xs:75: warning: implicit declaration of function ‘cvReleaseImage’
ObjectDetect.xs: In function ‘XS_Image__ObjectDetect_DESTROY’:
ObjectDetect.xs:86: error: ‘CvHaarClassifierCascade’ undeclared (first use in this function)
ObjectDetect.xs:86: error: ‘cascade’ undeclared (first use in this function)
ObjectDetect.xs:88: error: expected expression before ‘)’ token
ObjectDetect.xs:89: warning: implicit declaration of function ‘cvReleaseHaarClassifierCascade’
make: *** [ObjectDetect.o] Error 1
JIRO/Image-ObjectDetect-0.12.tar.gz
/usr/bin/make -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
JIRO/Image-ObjectDetect-0.12.tar.gz : make NO
Any help? Thanks.
Glad to see someone using OpenCV with Perl! I hope you can get it working and show us some nice asps and scripts :-)
You seem to be building from source and installing packages (with yum) - this sometimes complicates matters when it comes to dependencies. For example, you may have a version of OpenCV that is too new for the CPAN module. Image::ObjectDetect` is fairly old
(the last release was several years ago http://metacpan.org/pod/Image::ObjectDetect) whereas OpenCV is being actively developed.
Note this line:
ObjectDetect.xs:8:21: error: highgui.h: No such file or directory
I came across a similar error compiling applications that depend on OpenCV after a recent update. Either the header files were missing; the applications Makefiles did not know how to locate them; or other development libraries and headers in the chain of dependencies needed updating as well.
You may get better luck solving this by posting to the OpenCV development list where the error message may look more familiar.
See: http://groups.yahoo.com/neo/groups/OpenCV/info
You could try installing some other modules to see if it is perl, XS, gcc or your version of OpenCV that is at fault. Here's another module that uses OpenCV:
https://github.com/shisful/Image-OpenCV

Build PostgreSQL without-ldap Error [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I want to configure my new PostgreSQL Server without ldap. When I execute "gmake world" command it turns out the follwoing error; anybody knows this?
If have tested that if I configure PostgreSQL --with-ldap, it is okay!
--version
PostgreSQL: Postgresql 9.1
OS : Red Hat Enterprise Linux Server release 5.5 (Tikanga)
--config script
./configure --prefix=/opt/pgsql9.1 --with-pgport=1923 --with-segsize=8 --with-wal-segsize=64 --with-wal-blocksize=64 --with-perl --with-python --with-openssl --with-pam --with-libxml --with-libxslt --enable-thread-safety --without-ldap
--a part of "gmake world" log
utils/time/tqual.o utils/time/snapmgr.o utils/fmgrtab.o ../../src/timezone/localtime.o ../../src/timezone/strftime.o ../../src/timezone/pgtz.o ../../src/port/libpgport_srv.a -lxslt -lxml2 -lpam -lssl -lcrypto -lcrypt -ldl -lm -o postgres
libpq/auth.o: In function `InitializeLDAPConnection':
auth.c:(.text+0x2c4): undefined reference to `ldap_init'
auth.c:(.text+0x2e7): undefined reference to `ldap_set_option'
auth.c:(.text+0x329): undefined reference to `ldap_start_tls_s'
auth.c:(.text+0x339): undefined reference to `ldap_unbind'
auth.c:(.text+0x37e): undefined reference to `ldap_unbind'
libpq/auth.o: In function `CheckLDAPAuth':
auth.c:(.text+0x163a): undefined reference to `ldap_simple_bind_s'
auth.c:(.text+0x1647): undefined reference to `ldap_unbind'
auth.c:(.text+0x1690): undefined reference to `ldap_simple_bind_s'
auth.c:(.text+0x174c): undefined reference to `ldap_search_s'
auth.c:(.text+0x1768): undefined reference to `ldap_count_entries'
auth.c:(.text+0x1783): undefined reference to `ldap_first_entry'
auth.c:(.text+0x1792): undefined reference to `ldap_get_dn'
auth.c:(.text+0x17c3): undefined reference to `ldap_memfree'
auth.c:(.text+0x17ce): undefined reference to `ldap_msgfree'
auth.c:(.text+0x17d9): undefined reference to `ldap_unbind_s'
auth.c:(.text+0x1929): undefined reference to `ldap_get_option'
auth.c:(.text+0x1964): undefined reference to `ldap_err2string'
auth.c:(.text+0x19c2): undefined reference to `ldap_get_option'
auth.c:(.text+0x19fd): undefined reference to `ldap_err2string'
auth.c:(.text+0x1a42): undefined reference to `ldap_msgfree'
auth.c:(.text+0x1a5e): undefined reference to `ldap_count_entries'
auth.c:(.text+0x1b0a): undefined reference to `ldap_count_entries'
collect2: ld 返回 1
gmake[2]: *** [postgres] 错误 1
gmake[2]: Leaving directory `/opt/soft_bak/postgresql-9.1.0/src/backend'
gmake[1]: *** [all-backend-recurse] 错误 2
gmake[1]: Leaving directory `/opt/soft_bak/postgresql-9.1.0/src'
gmake: *** [world-src-recurse] 错误 2
If you first build --with-ldap and then without, you need to run make distclean in between (or do configure --enable-depend in the first run).