You are not logged in.

#1 2012-12-01 07:31:20

maximax
Member
Registered: 2011-09-29
Posts: 7

[SOLVED] Problem building exim 4.80.1 with postgresql lookup support

I am trying to build Exim 4.80.1 with postgresql lookup support and I don't need ldap lookup support anymore
I used the ABS folder for exim as a starting point
Specifically I tried building against postgresql-libs 9.1.3-1 and 9.2.1-2 (latest)
except for firefox and postgresql-libs (I reverted to 9.1.3 because thats the version running on my server) my system is fully updated - no packages from testing

After much googling and hours of trying, these are the adaptions to the makefile I think should work:

#########################
diff exim.Makefile exim.Makefile.orig
292c292
< # LOOKUP_LDAP=yes
---
> LOOKUP_LDAP=yes
298c298
< LOOKUP_PGSQL=yes
---
> # LOOKUP_PGSQL=yes
349,350d348
< LOOKUP_INCLUDE=-I /usr/include -I /usr/include/postgresql
<
352d349
< LOOKUP_LIBS=-L/usr/lib -lpq
#########################

I tried all kinds of modifications, also those from the outdated AUR package exim-postgres
but when I start 'makepkg -c', eventually this appears:

#########################
gcc -o exim
lookups/lookups.a(pgsql.o): In function `pgsql_tidy':
pgsql.c:(.text+0x188): undefined reference to `PQfinish'
lookups/lookups.a(pgsql.o): In function `perform_pgsql_search':
pgsql.c:(.text+0x451): undefined reference to `PQsetdbLogin'
pgsql.c:(.text+0x45c): undefined reference to `PQstatus'
pgsql.c:(.text+0x47b): undefined reference to `PQerrorMessage'
pgsql.c:(.text+0x49d): undefined reference to `PQfinish'
pgsql.c:(.text+0x4b4): undefined reference to `PQsetClientEncoding'
pgsql.c:(.text+0x4c6): undefined reference to `PQsetNoticeProcessor'
pgsql.c:(.text+0x51d): undefined reference to `PQexec'
pgsql.c:(.text+0x528): undefined reference to `PQresultStatus'
pgsql.c:(.text+0x541): undefined reference to `PQcmdTuples'
pgsql.c:(.text+0x598): undefined reference to `PQresultStatus'
pgsql.c:(.text+0x59f): undefined reference to `PQresStatus'
pgsql.c:(.text+0x5aa): undefined reference to `PQresultErrorMessage'
pgsql.c:(.text+0x5ea): undefined reference to `PQnfields'
pgsql.c:(.text+0x5fa): undefined reference to `PQntuples'
pgsql.c:(.text+0x659): undefined reference to `PQgetlength'
pgsql.c:(.text+0x66b): undefined reference to `PQgetvalue'
pgsql.c:(.text+0x695): undefined reference to `PQgetvalue'
pgsql.c:(.text+0x6ba): undefined reference to `PQfname'
pgsql.c:(.text+0x73d): undefined reference to `PQclear'
collect2: error: ld returned 1 exit status
make[1]: *** [exim] Error 1
make[1]: Leaving directory `/tmp/makepkg/src/exim-4.80.1/build-Linux-x86_64'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
#########################

Can someone point me in the right direction? I really don't know what to do anymore... Thanks a lot!

Last edited by maximax (2012-12-07 20:42:19)

Offline

#2 2012-12-06 13:22:57

maximax
Member
Registered: 2011-09-29
Posts: 7

Re: [SOLVED] Problem building exim 4.80.1 with postgresql lookup support

Did maybe anyone manage to either build with LOOKUP_PGSQL=yes
or was able to reproduce 'undefined reference to' thingies?

Offline

#3 2012-12-07 20:38:54

maximax
Member
Registered: 2011-09-29
Posts: 7

Re: [SOLVED] Problem building exim 4.80.1 with postgresql lookup support

Ok, I found the problem.
The file exim.Makefile from ABS features the line
LOOKUP_LIBS=...
twice.
Once somewhere in the middle (where it belongs?) and then once more at the end of the file.
So there you go. Thanks everyone.

Offline

Board footer

Powered by FluxBB