[postgis-users] linux failed postgis 3.1.1 compile against proj 8.0.0 (could not find libproj)
Paul Ramsey
pramsey at cleverelephant.ca
Sat Apr 3 15:07:07 PDT 2021
3.1.1 doesn't include the proj8 fix, the 3.1.2 release will. You can use
the front of the stable-3.1 branch or the front of main branch.
P.
On Sat, Apr 3, 2021 at 1:23 PM Saulteau Don <sault.don at gmail.com> wrote:
> I'm building on arch linux and trying to see if postgis 3.1.1 will compile
> against proj 8.0.0 and get "error: could not find libproj - you may need
> to specify the directory of a PROJ installation using --with-projdir"
>
> Looks like it's possible to build against postgis 3 with proj 8 [1]
>
> The patch [2] isn't in the 3.1.1 release so I applied it and also used the
> --with-projdir=/usr option but get same error.
>
> OS: Linux archasus 5.11.11-arch1-1 #1 SMP PREEMPT Tue, 30 Mar 2021
> 14:10:17 +0000 x86_64 GNU/Linux
> PostGIS: 3.1.1
> PROJ: 8.0.0
>
> Some of the configure log is below but have uploaded the entire log to my
> drive [3]:
>
> | #include <proj_api.h>
>> configure:16973: result: no
>> configure:16973: checking for proj_api.h
>> configure:16973: result: no
>> configure:16977: checking proj.h usability
>> configure:16977: gcc -c -std=gnu99 -march=native -O2 -pipe
>> -fstack-protector-strong -fno-plt -fno-math-errno -fno-signed-zeros
>> -I/usr/include conftest.c >&5
>> configure:16977: $? = 0
>> configure:16977: result: yes
>> configure:16977: checking proj.h presence
>> configure:16977: gcc -E -I/usr/include conftest.c
>> configure:16977: $? = 0
>> configure:16977: result: yes
>> configure:16977: checking for proj.h
>> configure:16977: result: yes
>> configure:16993: checking for proj.h
>> configure:16993: result: yes
>> configure:17028: gcc -o conftest -std=gnu99 -march=native -O2 -pipe
>> -fstack-protector-strong -fno-plt -fno-math-errno -fno-signed-zeros
>> -I/usr/include -Wl,-O1,
>> --sort-common,--as-needed,-z,relro,-z,now -lm conftest.c >&5
>> configure:17028: $? = 0
>> configure:17028: ./conftest
>> configure:17028: $? = 0
>> configure:17108: checking for pj_get_release in -lproj
>> configure:17133: gcc -o conftest -std=gnu99 -march=native -O2 -pipe
>> -fstack-protector-strong -fno-plt -fno-math-errno -fno-signed-zeros
>> -D_FORTIFY_SOURCE=2 -Wl
>> ,-O1,--sort-common,--as-needed,-z,relro,-z,now -lm conftest.c -lproj
>> -L/usr/lib -lproj >&5
>> /usr/bin/ld: /tmp/cclmEHNm.o: in function `main':
>> conftest.c:(.text.startup+0x8): undefined reference to `pj_get_release'
>> collect2: error: ld returned 1 exit status
>> configure:17133: $? = 1
>> configure: failed program was:
>> | /* confdefs.h */
>> | #define PACKAGE_NAME ""
>> | #define PACKAGE_TARNAME ""
>> | #define PACKAGE_VERSION ""
>> | #define PACKAGE_STRING ""
>> | #define PACKAGE_BUGREPORT ""
>> | #define PACKAGE_URL ""
>> | #define STDC_HEADERS 1
>> | #define HAVE_SYS_TYPES_H 1
>> | #define HAVE_SYS_STAT_H 1
>> | #define HAVE_STDLIB_H 1
>> | #define HAVE_STRING_H 1
>> | #define HAVE_MEMORY_H 1
>> | #define HAVE_STRINGS_H 1
>> | #define HAVE_INTTYPES_H 1
>> | #define HAVE_STDINT_H 1
>> | #define HAVE_UNISTD_H 1
>> | #define HAVE_DLFCN_H 1
>> | #define LT_OBJDIR ".libs/"
>> | #define POSTGIS_MAJOR_VERSION "3"
>> | #define POSTGIS_MINOR_VERSION "1"
>> | #define POSTGIS_MICRO_VERSION "1"
>> | #define YYTEXT_POINTER 1
>> | #define HAVE_IEEEFP_H 0
>> | #define HAVE_TERMIOS_H 1
>> | #define HAVE_VASPRINTF 1
>> | #define HAVE_ASPRINTF 1
>> | #define HAVE_FSEEKO 1
>> | #define HAVE_ICONV 1
>> | #define PGSQL_LOCALEDIR "/usr/share/locale"
>> | #define HAVE_LIBPQ 1
>> | #define POSTGIS_PGSQL_VERSION 130
>> | #define POSTGIS_PGSQL_HR_VERSION 13.0
>> | #define HAVE_LIBXML_TREE_H 1
>> | #define HAVE_LIBXML_PARSER_H 1
>> | #define HAVE_LIBXML_XPATH_H 1
>> | #define HAVE_LIBXML_XPATHINTERNALS_H 1
>> | #define HAVE_LIBXML2 1
>> | #define POSTGIS_LIBXML2_VERSION "2.9.10"
>> | #define HAVE_LIBGEOS_C 1
>> | #define POSTGIS_GEOS_VERSION 39
>> | #define POSTGIS_SFCGAL_VERSION 10309
>> | #define HAVE_SFCGAL 1
>> | #define ENABLE_NLS 1
>> | #define HAVE_GETTEXT 1
>> | #define HAVE_DCGETTEXT 1
>> | #define POSTGIS_PROJ_VERSION 80
>> | /* end confdefs.h. */
>> |
>> | /* Override any GCC internal prototype to avoid an error.
>> | Use char because int might match the return type of a GCC
>> | builtin and then its argument prototype would still apply. */
>> | #ifdef __cplusplus
>> | extern "C"
>> | #endif
>> | char pj_get_release ();
>> | int
>> | main ()
>> | {
>> | return pj_get_release ();
>> | ;
>> | return 0;
>> | }
>> configure:17142: result: no
>> configure:17152: error: could not find libproj - you may need to specify
>> the directory of a PROJ installation using --with-projdir
>
>
>
>
> SaultDon
>
> [1] https://trac.osgeo.org/postgis/ticket/4860
> [2]
> https://github.com/postgis/postgis/commit/9522a6f869ee6d170d97e7c593d7e5d71ec02a9b
> [3]
> https://drive.google.com/file/d/16FupiGJD69O75iW2eGAIErXuM-ncuP1p/view?usp=sharing
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210403/fb0e4bdc/attachment.html>
More information about the postgis-users
mailing list