Modify

Opened 4 years ago

Closed 4 years ago

#14283 closed defect (fixed)

Make postgresql fail

Reported by: ciusss89 Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Make postgresql fail Cc:

Description

My build platform setup:
Dual core machine with jessie/sid debian version, kernel is 3.9-6.dmz.2-liquorix-amd64.

Compiling last kirkwood trunk revision and my .config is as default.
Make stops on postgresql. I not found the problem that generate this error.
See attachment

make[8]: Leaving directory `/mnt/data/OpenWrt_build/kirkwood/build_dir/target-arm_xscale_uClibc-0.9.33.2_eabi/postgresql-9.0.1/src/port'
arm-openwrt-linux-uclibcgnueabi-gcc -Os -pipe -march=armv5te -mtune=xscale -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fpic -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv pg_ctl.o  -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -L../../../src/port -L/mnt/data/OpenWrt_build/kirkwood/staging_dir/target-arm_xscale_uClibc-0.9.33.2_eabi/usr/lib -L/mnt/data/OpenWrt_build/kirkwood/staging_dir/target-arm_xscale_uClibc-0.9.33.2_eabi/lib -L/mnt/data/OpenWrt_build/kirkwood/staging_dir/toolchain-arm_xscale_gcc-4.6-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/mnt/data/OpenWrt_build/kirkwood/staging_dir/toolchain-arm_xscale_gcc-4.6-linaro_uClibc-0.9.33.2_eabi/lib   -lpgport -lz -lreadline -lncurses -lcrypt -ldl -lm  -o pg_ctl
../../../src/interfaces/libpq/libpq.so: undefined reference to `pthread_sigmask'
/mnt/data/OpenWrt_build/kirkwood/staging_dir/toolchain-arm_xscale_gcc-4.6-linaro_uClibc-0.9.33.2_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.6.4/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: warning: .init_array section has zero size
collect2: ld returned 1 exit status
make[7]: *** [pg_ctl] Error 1
make[7]: Leaving directory `/mnt/data/OpenWrt_build/kirkwood/build_dir/target-arm_xscale_uClibc-0.9.33.2_eabi/postgresql-9.0.1/src/bin/pg_ctl'
make[6]: *** [all] Error 2
make[6]: Leaving directory `/mnt/data/OpenWrt_build/kirkwood/build_dir/target-arm_xscale_uClibc-0.9.33.2_eabi/postgresql-9.0.1/src/bin'
make[5]: *** [all] Error 2

Attachments (1)

postgresql (58.2 KB) - added by ciusss89 4 years ago.
Full postgresql log

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by ciusss89

Full postgresql log

comment:1 follow-up: Changed 4 years ago by anonymous

I've run into this issue also while compiling snort. Postgresql is compiled as a module for snort.
Anyway the solution in my case (compiling for ARM brcm 2708 platform) as to edit the Makefile and add the following:

I think a make clean first. Then..

feeds/packages/ligs/postgresql/Makefile
add -lpthread to TARGET_CFLAGS definition like:
TARGET_CFLAGS += $(FPIC) -lpthread

I suspect a more elegant solution would need to be submitted as a patch like.
ifeq ($(ARCH),arm)

TARGET_CFLAGS += -lpthread

endif

Cheers

Derek

comment:2 in reply to: ↑ 1 Changed 4 years ago by ciusss89

Thanks for tips.
I edit postgresql makefile in accord your statement

ifeq ($(ARCH),arm)
    TARGET_CFLAGS += -lpthread
else
    TARGET_CFLAGS += $(FPIC)
endif

Its work.

Replying to anonymous:

I've run into this issue also while compiling snort. Postgresql is compiled as a module for snort.
Anyway the solution in my case (compiling for ARM brcm 2708 platform) as to edit the Makefile and add the following:

I think a make clean first. Then..

feeds/packages/ligs/postgresql/Makefile
add -lpthread to TARGET_CFLAGS definition like:
TARGET_CFLAGS += $(FPIC) -lpthread

I suspect a more elegant solution would need to be submitted as a patch like.
ifeq ($(ARCH),arm)

TARGET_CFLAGS += -lpthread

endif

Cheers

Derek

comment:3 Changed 4 years ago by hauke

  • Resolution set to fixed
  • Status changed from new to closed

Thank you for the patch, this was fixed in r39514.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.