Bug Hunting Session
Bug 100459 - Building `ExternalProject/postgresql` fails
Summary: Building `ExternalProject/postgresql` fails
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-17 15:04 UTC by Paul Menzel
Modified: 2017-08-03 16:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
[PATCH] external: Link PostgreSQL with `-lpthread` (1.65 KB, patch)
2016-06-17 15:04 UTC, Paul Menzel
Details
[PATCH v2] external: Link PostgreSQL with `-lpthread` (1.72 KB, text/plain)
2016-06-20 08:46 UTC, Paul Menzel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Menzel 2016-06-17 15:04:04 UTC
Created attachment 125709 [details]
[PATCH] external: Link PostgreSQL with `-lpthread`

Building LibreOffice 5.1.3.2 fails due to an error in the configure script of the external project `posgresql` [1][2].

```
$ make -j --prefix=…
[…]
configure: error: library 'ldap_r' is required for LDAP
[CXX] dbaccess/source/ui/tabledesign/TableUndo.cxx
/dev/shm/bee-root/libreoffice/libreoffice-5.1.3.2-0/source/external/postgresql/ExternalProject_postgresql.mk:54: recipe for target '/dev/shm/bee-root/libreoffice/libreoffice-5.1.3.2-0/build/workdir/ExternalProject/postgresql/build' failed
make[1]: *** [/dev/shm/bee-root/libreoffice/libreoffice-5.1.3.2-0/build/workdir/ExternalProject/postgresql/build] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:244: recipe for target 'build' failed
make: *** [build] Error 2
```

Adding `-lpthread` to `external/postgresql/ExternalProject_postgresql.mk` fixes that (misleading) error.

[1] https://ask.libreoffice.org/en/question/28279/configure-error-library-ldap_r-is-required-for-ldap-make1-usrsrclibreoffice-4142workdirunxlngx6proexternalprojectpostgresqlbuild-cuo-wu-1/
[2] https://ask.libreoffice.org/en/question/48589/make-from-source-ldap-error/
[3] http://pastebin.com/NULYyZ6r
Comment 1 Buovjaga 2016-06-18 20:00:55 UTC
Donald: would you be willing to submit the patch to gerrit for review and inclusion? https://wiki.documentfoundation.org/Development/gerrit

(Note the part "Add yourself to the contributor list" in the wiki page).
Comment 2 Paul Menzel 2016-06-20 08:46:12 UTC
Created attachment 125762 [details]
[PATCH v2] external: Link PostgreSQL with `-lpthread`

This patch applies cleanly.
Comment 3 Buovjaga 2016-06-20 09:22:47 UTC
(In reply to Paul Menzel from comment #2)
> Created attachment 125762 [details]
> [PATCH v2] external: Link PostgreSQL with `-lpthread`
> 
> This patch applies cleanly.

Can you upload it to gerrit and send your license information to the developer mailing list?
Comment 4 Xisco Faulí 2017-08-03 16:29:39 UTC Comment hidden (obsolete)
Comment 5 Paul Menzel 2017-08-03 16:52:31 UTC
Version 5.3.4, 5.3.5 and 5.4.0 built without the patch. I haven’t check the other versions.