OpenWrt Forum Archive

Topic: postgresql/ranlib problem on recent kamikaze svn version

The content of this topic has been archived on 10 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Dear all,

I've tried to compile libpq/postgresql a few times over the last week, and always failed because of some ranlib problem. It seems that the problem existed in an older svn version (using an older version of postgresql as well), but got fixed at that time (https://dev.openwrt.org/cgi-bin/trac.fcgi/ticket/1938). I don't really understand the solution in the ticket, and the patch that was submitted at that time just seems to upgrade to a new version of postgresql. Can anybody help?

Here's the output of my make world V=99 at the point of breaking.

mips-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -fpic -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -L../../src/port -L/Users/hkl/kamikaze/staging_dir/toolchain-mips_gcc4.1.2/lib -L/Users/hkl/kamikaze/staging_dir/mips/usr/lib -L/Users/hkl/kamikaze/staging_dir/mips/lib  -Wl,-E access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o tsearch/SUBSYS.o utils/SUBSYS.o ../../src/timezone/SUBSYS.o ../../src/port/libpgport_srv.a -lcrypt -ldl -lm -lnotimpl -o postgres
../../src/port/libpgport_srv.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make[6]: *** [postgres] Error 1
make[5]: *** [all] Error 2
make[4]: *** [all] Error 2
make[3]: *** [/Users/hkl/kamikaze/build_dir/mips/postgresql-8.3.3/.built] Error 2
make[2]: *** [package/feeds/packages/postgresql/compile] Error 2
make[1]: *** [/Users/hkl/kamikaze/staging_dir/mips/stamp/.package_compile] Error 2
make: *** [world] Error 2

Cheers,
hol9000

Hi all,

it seems, that the following helps

staging_dir/toolchain-mips_gcc4.1.2/bin/mips-linux-ranlib build_dir/mips/postgresql-8.3.3/src/port/libpgport_srv.a

I realized that the second line in the ticket, that I linked to was a commandline to be used to solve the problem. In my configuration I had to change it to the code shown above.

Nevertheless I have the feeling that somewhere there is an improper definition related to ranlib in a Makefile - but I couldn't find the place yet.

Cheers,
hol9000

The discussion might have continued from here.