New: Building postgresql package on Debian 9.4 x64 for armel target fails
https://bugs.busybox.net/show_bug.cgi?id=11071
Bug ID: 11071
Summary: Building postgresql package on Debian 9.4 x64 for
armel target fails
Product: buildroot
Version: 2018.02.2
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: dde at innovaphone.com
CC: buildroot at uclibc.org
Target Milestone: ---
I'm currently trying to build buildroot with the postgresql package. I'm building on Debian Stretch x86_64.
The target configuration in buildroot is for armel:
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE" BR2_GCC_TARGET_ABI="aapcs-linux" BR2_GCC_TARGET_CPU="arm926ej-s" BR2_GCC_TARGET_FLOAT_ABI="soft" BR2_GCC_TARGET_MODE="arm" BR2_BINFMT_SUPPORTS_SHARED=y BR2_READELF_ARCH_NAME="ARM" BR2_BINFMT_ELF=y BR2_ARM_CPU_MAYBE_HAS_VFPV2=y BR2_ARM_CPU_HAS_ARM=y BR2_ARM_CPU_HAS_THUMB=y
The configure script of postgresql throws an error for libxml2 (I build with --with-libxml as a custom option) and libz (this is standard, not changed by me):
output/host/lib/libz.so: file not recognized: File format not recognized output/host/lib/libxml2.so: file not recognized: File format not recognized
Seems as if the host libraries are wrong.
If I replace these two libraries with the libs found in output/target/usr/lib, the build finishes without an error.
I do not have this issue on Debian Stretch x86 (32bit).
Greetings,
Daniel
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
https://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #1 from dde at innovaphone.com ---
Created attachment 7606
--> https://bugs.busybox.net/attachment.cgi?id=7606&action=edit
config.log of postgresql
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #2 from Thomas Petazzoni <[email protected]> --- Thanks for this report. Could you attach the build log of the postgresql package, from the extract step to the failure, and also the config.log file generated by postgresql's configure script ?
Thanks!
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #3 from dde at innovaphone.com ---
Created attachment 7611
--> https://bugs.busybox.net/attachment.cgi?id=7611&action=edit
build.log of buildroot postgresql
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #4 from dde at innovaphone.com ---
(In reply to Thomas Petazzoni from comment #2)
The config.log is already attached (it's a zip file) and I attached the build.log now.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED--- Comment #5 from Thomas Petazzoni <[email protected]> --- Could you please build without your custom --with-libxml option ?
That's the reason for the failure. It ends up using xml2-config from your host machine, which returns bogus linker flags, which breaks the build.
So it's basically your custom addition that breaks the build, the code in Buildroot builds fine.
Please add:
POSTGRESQL_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config
when enabling libxml2 support (i.e when you're passing --with-libxml). This should solve your problem.
And please submit a Buildroot patch adding this, once everything works fine. Thanks!
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #6 from dde at innovaphone.com ---
Created attachment 7616
--> https://bugs.busybox.net/attachment.cgi?id=7616&action=edit
Patch for the postgresql.mk to support libxml2 if selected
This patch enables the configure option --with-libxml for PostgreSQL if libxml is enabled.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #7 from dde at innovaphone.com ---
(In reply to Thomas Petazzoni from comment #5)
Thanks for your reply! This solved the issue. I wouldn't have guessed something like this, but I'm not really familiar to buildroot backgrounds ;)
I attached a patch with the changes of package/postgresql.mk and this patch adds --with-libxml just if libxml is enabled.
I hope this is ok like this ...
Greetings,
Daniel
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #8 from Thomas Petazzoni <[email protected]> --- Thanks! Could you submit this patch on the Buildroot mailing list ? See
https://buildroot.org/downloads/manual/manual.html#submitting-patches for details on how to do that.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #9 from Peter Seiderer <[email protected]> --- (In reply to dde from comment #6)
Thanks for the patch, looks good, the only missing thing is the dependency on libxml2, e.g.:
POSTGRESQL_DEPENDENCIES += libxml2
Regards,
Peter
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #10 from Peter Seiderer <[email protected]> --- (In reply to Peter Seiderer from comment #9)
..and for consistency with the other options (or buildroot style) the else branch:
ifeq ($(BR2_PACKAGE_LIBXML2),y)POSTGRESQL_DEPENDENCIES += libxml2POSTGRESQL_CONF_OPTS += --with-libxmlPOSTGRESQL_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config elsePOSTGRESQL_CONF_OPTS += --without-libxml
endif
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #11 from dde at innovaphone.com ---
(In reply to Peter Seiderer from comment #10)
Thanks for your hints! I submitted the patch to the mailing list, at least I hope that it worked ;)
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #12 from Peter Seiderer <[email protected]> --- (In reply to dde from comment #11)
Patch did not hit the mailing list (yet)...
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11071] Building postgresql package on Debian 9.4 x64 for armel target fails
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11071
--- Comment #13 from dde at innovaphone.com ---
(In reply to Peter Seiderer from comment #12)
Yes, I figured out that the mail hasn't been sent although I thought so. I didn't manage to get the sendmail config running with our internal SMTP server so I sent the mail now manually through my private mail account. I hope the format is correct.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.