pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem compiling PostgreSQL.
7+ messages / 3 participants
[nested] [flat]

* Problem compiling PostgreSQL.
@ 2018-05-17 07:31  Paul Linehan <linehanp@tcd.ie>
  0 siblings, 3 replies; 7+ messages in thread

From: Paul Linehan @ 2018-05-17 07:31 UTC (permalink / raw)
  To: ; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi all,

I'm having problems compiling PostgreSQL.

I can run "make" no problem with this command

./configure --prefix=/home/pol/Downloads/sware/db/pg/inst
--mandir=/home/pol/Downloads/sware/db/pg/inst/man
--docdir=/home/pol/Downloads/sware/db/pg/inst/doc --enable-nls
--with-python --with-openssl --with-systemd --with-uuid=e2fs --with-libxml
--with-libxslt

but not this one

./configure --prefix=/home/pol/Downloads/sware/db/pg/inst
--mandir=/home/pol/Downloads/sware/db/pg/inst/man
--docdir=/home/pol/Downloads/sware/db/pg/inst/doc --enable-nls
--with-python --with-icu --with-openssl --with-systemd --with-uuid=e2fs
--with-libxml --with-libxslt

(for those of you with bad eyesight, the difference is in the extra
"--with-icu" in the second failing command! :-) )


Now, I've installed the icu libraries using the classic ./configure, make
and sudo make install.

The error I'm getting is

make[4]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src/port'
make -C ../../src/common all
make[4]: Entering directory '/home/pol/Downloads/sware/db/pg/src/src/common'
make -C ../backend submake-errcodes
make[5]: Entering directory
'/home/pol/Downloads/sware/db/pg/src/src/backend'
make[5]: Nothing to be done for 'submake-errcodes'.
make[5]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src/backend'
make[4]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src/common'
make[3]: Leaving directory
'/home/pol/Downloads/sware/db/pg/src/src/timezone'
/usr/bin/gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-O2 -L../../src/port -L../../src/common -Wl,--as-needed
-Wl,-rpath,'/home/pol/Downloads/sware/db/pg/inst/lib',--enable-new-dtags
-Wl,-E access/brin/brin.o access/brin/brin_pageops.o

... a shedload more .o files snipped from error and then at the end:

../../src/timezone/pgtz.o ../../src/port/libpgport_srv.a
../../src/common/libpgcommon_srv.a -lpthread -lxslt -lxml2 -lssl -lcrypto
-lrt -lcrypt -ldl -lm -licui18n -licuuc -licudata -lsystemd -o postgres
commands/collationcmds.o: In function `pg_import_system_collations':
collationcmds.c:(.text+0xe16): undefined reference to
`uloc_countAvailable_61'
collationcmds.c:(.text+0xe36): undefined reference to `uloc_getAvailable_61'
collationcmds.c:(.text+0xe5b): undefined reference to
`uloc_toLanguageTag_61'
collationcmds.c:(.text+0xf0c): undefined reference to
`uloc_countAvailable_61'
collationcmds.c:(.text+0xf85): undefined reference to
`uloc_getDisplayName_61'
collationcmds.c:(.text+0x112e): undefined reference to `u_errorName_61'
regex/regcomp.o: In function `pg_wc_isalpha':
regcomp.c:(.text+0x9a1): undefined reference to `u_isalpha_61'  <--- seems
to be an icu issue here?
regex/regcomp.o: In function `pg_wc_isspace':
regcomp.c:(.text+0xa81): undefined reference to `u_isspace_61'


... snip a lot more undefined reference errors with u_xxxx_61 in them

and then at the end

varlena.c:(.text+0x2245): undefined reference to `ucol_strcoll_61'
varlena.c:(.text+0x2292): undefined reference to `ucol_strcollUTF8_61'
varlena.c:(.text+0x22c3): undefined reference to `u_errorName_61'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:61: postgres] Error 1
make[2]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src/backend'
make[1]: *** [Makefile:38: all-backend-recurse] Error 2
make[1]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2
[pol@polhost src]$


I've compiled PostgreSQL many times and I've always been impressed with the
way it "just works"!

I would be grateful if anybody could show me how I could resolve my issue.

TIA, Pól...

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem compiling PostgreSQL.
@ 2018-05-17 07:56  Michael Paquier <michael@paquier.xyz>
  parent: Paul Linehan <linehanp@tcd.ie>
  2 siblings, 1 reply; 7+ messages in thread

From: Michael Paquier @ 2018-05-17 07:56 UTC (permalink / raw)
  To: Paul Linehan <linehanp@tcd.ie>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Thu, May 17, 2018 at 08:31:48AM +0100, Paul Linehan wrote:
> I'm having problems compiling PostgreSQL.

On which platform and/or distribution are you trying the code
compilation?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem compiling PostgreSQL.
@ 2018-05-17 08:04  Paul Linehan <linehanp@tcd.ie>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 7+ messages in thread

From: Paul Linehan @ 2018-05-17 08:04 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi, and thanks for responding,


>> I'm having problems compiling PostgreSQL.

> On which platform and/or distribution are you trying the code
> compilation?


Ooops!

sorry about that - it's Linux Fedora 28, 64 bit Intel X86_64 - Samsung
laptop, 8GB RAM, quad-core.


Please don't hesitate to ask should you require further information!

Rgs,


Pól...




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem compiling PostgreSQL.
@ 2018-05-17 08:12  Paul Linehan <linehanp@tcd.ie>
  parent: Paul Linehan <linehanp@tcd.ie>
  0 siblings, 0 replies; 7+ messages in thread

From: Paul Linehan @ 2018-05-17 08:12 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

>> On which platform and/or distribution are you trying the code
>> compilation?

> sorry about that - it's Linux Fedora 28, 64 bit Intel X86_64 - Samsung
> laptop, 8GB RAM, quad-core.

PostgreSQL 10.4 also.


Pól...




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem compiling PostgreSQL.
@ 2018-05-17 09:41  Paul Linehan <linehanp@tcd.ie>
  parent: Paul Linehan <linehanp@tcd.ie>
  2 siblings, 0 replies; 7+ messages in thread

From: Paul Linehan @ 2018-05-17 09:41 UTC (permalink / raw)
  To: Paul Linehan <linehanp@tcd.ie>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi again,


As a followup - I ran this command  (do I need to set LD_LIBRARY_PATH?)

[pol@polhost /]$ sudo find . -name "icu*" | grep -v Downloads |  more


And got:


./usr/local/sbin/icupkg
./usr/local/bin/icuinfo
./usr/local/bin/icu-config
./usr/local/lib/icu
./usr/local/lib/pkgconfig/icu-io.pc
./usr/local/lib/pkgconfig/icu-uc.pc
./usr/local/lib/pkgconfig/icu-i18n.pc
./usr/local/share/icu
./usr/local/share/man/man8/icupkg.8
./usr/local/share/man/man1/icu-config.1
./usr/local/include/unicode/icuplug.h
./usr/local/include/unicode/icudataver.h
./usr/bin/icuinfo
./usr/bin/icu-config-64
./usr/bin/icu-config
./usr/lib64/icu
./usr/lib64/pkgconfig/icu-io.pc
./usr/lib64/pkgconfig/icu-uc.pc
./usr/lib64/pkgconfig/icu-i18n.pc
./usr/lib/jvm/java-10-openjdk-10.0.1.10-3.fc28.x86_64/legal/java.base/icu.md
./usr/share/maven-metadata/icu4j.xml
./usr/share/icu
./usr/share/licenses/icu4j
./usr/share/jython/javalib/icu4j_icu4j.jar
./usr/share/maven-poms/icu4j
./usr/share/maven-poms/icu4j/icu4j.pom
./usr/share/java/icu4j
./usr/share/java/icu4j/icu4j.jar
./usr/share/doc/icu4j
./usr/share/man/man1/icu-config.1.gz
./usr/share/man/man1/icuinfo.1.gz
./usr/include/boost/regex/icu.hpp
./usr/include/unicode/icuplug.h
./usr/include/unicode/icudataver.h
[pol@polhost /]$

It seems that the library was installed, but the PostgreSQL make
command can't "see" the libs?




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem compiling PostgreSQL.
@ 2018-05-17 11:27  Daniel Verite <daniel@manitou-mail.org>
  parent: Paul Linehan <linehanp@tcd.ie>
  2 siblings, 1 reply; 7+ messages in thread

From: Daniel Verite @ 2018-05-17 11:27 UTC (permalink / raw)
  To: Paul Linehan <linehanp@tcd.ie>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

	Paul Linehan wrote:

> Now, I've installed the icu libraries using the classic ./configure, make
> and sudo make install.

So it got installed under /usr/local

> collationcmds.c:(.text+0xe36): undefined reference to `uloc_getAvailable_61'
> collationcmds.c:(.text+0xe5b): undefined reference to
> `uloc_toLanguageTag_61'

61 is ICU's major version number.
You have two ICU versions installed, one from Fedora, with
its icu*.pc config files located in usr/lib64/pkgconfig, the other
(presumably v61, as it's the latest) in /usr/local/lib/pkgconfig/
Without specifying which one should be used, it looks like
Postgres get them mixed between compilation and link.

To use self-compiled ICU, I've been having success
configuring postgres with:

PKG_CONFIG_PATH=/path/to/icu/lib/pkgconfig \
./configure --with-icu [other flags]

I tend to install ICUs versions into their own directories rather
than /usr/local, and use Debian rather than Fedora, but you
might try PKG_CONFIG_PATH=/usr/local/lib/pkgconfig


Best regards,
-- 
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem compiling PostgreSQL.
@ 2018-05-17 12:39  Paul Linehan <linehanp@tcd.ie>
  parent: Daniel Verite <daniel@manitou-mail.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Paul Linehan @ 2018-05-17 12:39 UTC (permalink / raw)
  To: Daniel Verite <daniel@manitou-mail.org>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi and thanks for replying,

> I tend to install ICUs versions into their own directories rather
> than /usr/local, and use Debian rather than Fedora, but you
> might try PKG_CONFIG_PATH=/usr/local/lib/pkgconfig


I <hangs head in shame...> have figured it out. It all boils down to
actually taking the time and effort to RTFM...


In the readme.html - there is the following line:

Run the runConfigureICU script for your platform. (See configuration
note below).

So, I ran ./runConfigureICU Linux --prefix=/usr, and **then** ran
make, sudo make install and it's compiled.

Sorry for wasting everybody's time - it's just that, nowadays, I have
a Pavlovian response if I see an executable configure in the source
directory!

I'm going to send them an email (annoyed from Dublin) to say that they
could put an INSTALL file with this in it - although it is really my
fault! :-(



Go raibh maith agat/Merci encore,


Pól...


> Daniel Vérité




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2018-05-17 12:39 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17 07:31 Problem compiling PostgreSQL. Paul Linehan <linehanp@tcd.ie>
2018-05-17 07:56 ` Michael Paquier <michael@paquier.xyz>
2018-05-17 08:04   ` Paul Linehan <linehanp@tcd.ie>
2018-05-17 08:12     ` Paul Linehan <linehanp@tcd.ie>
2018-05-17 09:41 ` Paul Linehan <linehanp@tcd.ie>
2018-05-17 11:27 ` Daniel Verite <daniel@manitou-mail.org>
2018-05-17 12:39   ` Paul Linehan <linehanp@tcd.ie>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox