Bug 100459

Summary: Building `ExternalProject/postgresql` fails
Product: LibreOffice Reporter: Paul Menzel <pmenzel+bugs.documentfoundation.org>
Component: InstallationAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: buczek, ilmari.lauhakangas, pmenzel+bugs.documentfoundation.org, xiscofauli
Priority: medium    
Version: 5.1.3.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: [PATCH] external: Link PostgreSQL with `-lpthread`
[PATCH v2] external: Link PostgreSQL with `-lpthread`

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.