[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] linux failed postgis 3.1.1 compile against proj 8.0.0 (could not find libproj)
From:       Donovan Cameron <sault.don () gmail ! com>
Date:       2021-04-03 23:30:23
Message-ID: 76dc6827-1b1c-62bf-be34-f6337f57bf08 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks, should of tried that already instead of my hackery patching.... 
using stable-3.1 does the trick =)

On 2021-04-03 3:07 p.m., Paul Ramsey wrote:
> 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@gmail.com 
> <mailto:sault.don@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 intmight 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
>     <https://trac.osgeo.org/postgis/ticket/4860>
>     [2]
>     https://github.com/postgis/postgis/commit/9522a6f869ee6d170d97e7c593d7e5d71ec02a9b
>     <https://github.com/postgis/postgis/commit/9522a6f869ee6d170d97e7c593d7e5d71ec02a9b>
>     [3]
>     https://drive.google.com/file/d/16FupiGJD69O75iW2eGAIErXuM-ncuP1p/view?usp=sharing
>     <https://drive.google.com/file/d/16FupiGJD69O75iW2eGAIErXuM-ncuP1p/view?usp=sharing>
>     _______________________________________________
>     postgis-users mailing list
>     postgis-users@lists.osgeo.org <mailto:postgis-users@lists.osgeo.org>
>     https://lists.osgeo.org/mailman/listinfo/postgis-users
>     <https://lists.osgeo.org/mailman/listinfo/postgis-users>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users

[Attachment #5 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Thanks, should of tried that already instead of my hackery
      patching.... using stable-3.1 does the trick =)<br>
    </p>
    <div class="moz-cite-prefix">On 2021-04-03 3:07 p.m., Paul Ramsey
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CACowWR2HFdXiuzayLBcTVnSCfw7-TUc6HAKbFdUtyzbZtAvVGQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>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.</div>
        <div>P.<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sat, Apr 3, 2021 at 1:23 PM
          Saulteau Don &lt;<a href="mailto:sault.don@gmail.com"
            moz-do-not-send="true">sault.don@gmail.com</a>&gt; wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">I'm building on arch linux and trying to see if
            postgis 3.1.1 will compile against proj 8.0.0 and get  "<span
              style="font-family:monospace"><span
                style="color:rgb(0,0,0)">error: could not find libproj -
                you may need to specify the directory of a PROJ
                installation using --with-projdir"</span><br>
            </span>
            <div>
              <div><br>
              </div>
              <div>Looks like it's possible to build against postgis 3
                with proj 8 [1]</div>
              <div><br>
              </div>
              <div>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.</div>
              <div><br>
              </div>
              <div><font face="arial, sans-serif">OS: <span
                    style="color:rgb(0,0,0)">Linux archasus
                    5.11.11-arch1-1 #1 SMP PREEMPT Tue, 30 Mar 2021
                    14:10:17 +0000 x86_64 GNU/Linux</span></font></div>
              <div><font face="arial, sans-serif">PostGIS: 3.1.1</font></div>
              <div><font face="arial, sans-serif">PROJ: 8.0.0</font></div>
              <div><font face="arial, sans-serif"><br>
                </font></div>
              <div><font face="arial, sans-serif">Some of the configure
                  log is below but have uploaded the entire log to my
                  drive [3]:</font></div>
              <div><font face="arial, sans-serif"><br>
                </font></div>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex"><span
                style="color:rgb(0,0,0);font-family:monospace">|
                #include &lt;proj_api.h&gt;<br>
              </span><span style="font-family:monospace">configure:16973:
                result: no<br>
              </span><span style="font-family:monospace">configure:16973:
                checking for proj_api.h<br>
              </span><span style="font-family:monospace">configure:16973:
                result: no<br>
              </span><span style="font-family:monospace">configure:16977:
                checking proj.h usability<br>
              </span><span style="font-family:monospace">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 &gt;&amp;5<br>
              </span><span style="font-family:monospace">configure:16977:
                $? = 0<br>
              </span><span style="font-family:monospace">configure:16977:
                result: yes<br>
              </span><span style="font-family:monospace">configure:16977:
                checking proj.h presence<br>
              </span><span style="font-family:monospace">configure:16977:
                gcc -E -I/usr/include conftest.c<br>
              </span><span style="font-family:monospace">configure:16977:
                $? = 0<br>
              </span><span style="font-family:monospace">configure:16977:
                result: yes<br>
              </span><span style="font-family:monospace">configure:16977:
                checking for proj.h<br>
              </span><span style="font-family:monospace">configure:16977:
                result: yes<br>
              </span><span style="font-family:monospace">configure:16993:
                checking for proj.h<br>
              </span><span style="font-family:monospace">configure:16993:
                result: yes<br>
              </span><span style="font-family:monospace">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,<br>
              </span><span \
                style="font-family:monospace">--sort-common,--as-needed,-z,relro,-z,now
                
                -lm conftest.c  &gt;&amp;5<br>
              </span><span style="font-family:monospace">configure:17028:
                $? = 0<br>
              </span><span style="font-family:monospace">configure:17028:
                ./conftest<br>
              </span><span style="font-family:monospace">configure:17028:
                $? = 0<br>
              </span><span style="font-family:monospace">configure:17108:
                checking for pj_get_release in -lproj<br>
              </span><span style="font-family:monospace">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<br>
              </span><span \
                style="font-family:monospace">,-O1,--sort-common,--as-needed,-z,relro,-z,now
                
                -lm conftest.c -lproj  -L/usr/lib -lproj &gt;&amp;5<br>
              </span><span style="font-family:monospace">/usr/bin/ld:
                /tmp/cclmEHNm.o: in function `main':<br>
              </span><span \
style="font-family:monospace">conftest.c:(.text.startup+0x8):  undefined reference to \
`pj_get_release'<br>  </span><span style="font-family:monospace">collect2:
                error: ld returned 1 exit status<br>
              </span><span style="font-family:monospace">configure:17133:
                $? = 1<br>
              </span><span style="font-family:monospace">configure:
                failed program was:<br>
              </span><span style="font-family:monospace">| /* confdefs.h
                */<br>
              </span><span style="font-family:monospace">| #define
                PACKAGE_NAME ""<br>
              </span><span style="font-family:monospace">| #define
                PACKAGE_TARNAME ""<br>
              </span><span style="font-family:monospace">| #define
                PACKAGE_VERSION ""<br>
              </span><span style="font-family:monospace">| #define
                PACKAGE_STRING ""<br>
              </span><span style="font-family:monospace">| #define
                PACKAGE_BUGREPORT ""<br>
              </span><span style="font-family:monospace">| #define
                PACKAGE_URL ""<br>
              </span><span style="font-family:monospace">| #define
                STDC_HEADERS 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_SYS_TYPES_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_SYS_STAT_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_STDLIB_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_STRING_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_MEMORY_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_STRINGS_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_INTTYPES_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_STDINT_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_UNISTD_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_DLFCN_H 1<br>
              </span><span style="font-family:monospace">| #define
                LT_OBJDIR ".libs/"<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_MAJOR_VERSION "3"<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_MINOR_VERSION "1"<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_MICRO_VERSION "1"<br>
              </span><span style="font-family:monospace">| #define
                YYTEXT_POINTER 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_IEEEFP_H 0<br>
              </span><span style="font-family:monospace">| #define
                HAVE_TERMIOS_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_VASPRINTF 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_ASPRINTF 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_FSEEKO 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_ICONV 1<br>
              </span><span style="font-family:monospace">| #define
                PGSQL_LOCALEDIR "/usr/share/locale"<br>
              </span><span style="font-family:monospace">| #define
                HAVE_LIBPQ 1<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_PGSQL_VERSION 130<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_PGSQL_HR_VERSION 13.0<br>
              </span><span style="font-family:monospace">| #define
                HAVE_LIBXML_TREE_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_LIBXML_PARSER_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_LIBXML_XPATH_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_LIBXML_XPATHINTERNALS_H 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_LIBXML2 1<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_LIBXML2_VERSION "2.9.10"<br>
              </span><span style="font-family:monospace">| #define
                HAVE_LIBGEOS_C 1<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_GEOS_VERSION 39<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_SFCGAL_VERSION 10309<br>
              </span><span style="font-family:monospace">| #define
                HAVE_SFCGAL 1<br>
              </span><span style="font-family:monospace">| #define
                ENABLE_NLS 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_GETTEXT 1<br>
              </span><span style="font-family:monospace">| #define
                HAVE_DCGETTEXT 1<br>
              </span><span style="font-family:monospace">| #define
                POSTGIS_PROJ_VERSION 80<br>
              </span><span style="font-family:monospace">| /* end
                confdefs.h.  */<br>
              </span><span style="font-family:monospace">|  <br>
              </span><span style="font-family:monospace">| /* Override
                any GCC internal prototype to avoid an error.<br>
              </span><span style="font-family:monospace">|    Use char
                because </span>int<span style="font-family:monospace">
                might match the return type of a GCC<br>
              </span><span style="font-family:monospace">|    builtin
                and then its argument prototype would still apply.  */<br>
              </span><span style="font-family:monospace">| #ifdef
                __cplusplus<br>
              </span><span style="font-family:monospace">| extern "C"<br>
              </span><span style="font-family:monospace">| #endif<br>
              </span><span style="font-family:monospace">| char
                pj_get_release ();<br>
              </span><span style="font-family:monospace">| int<br>
              </span><span style="font-family:monospace">| main ()<br>
              </span><span style="font-family:monospace">| {<br>
              </span><span style="font-family:monospace">| return
                pj_get_release ();<br>
              </span><span style="font-family:monospace">|   ;<br>
              </span><span style="font-family:monospace">|   return 0;<br>
              </span><span style="font-family:monospace">| }<br>
              </span><span style="font-family:monospace">configure:17142:
                result: no<br>
              </span><span style="font-family:monospace">configure:17152:
                error: could not find libproj - you may need to specify
                the directory of a PROJ installation using
                --with-projdir</span></blockquote>
            <div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>SaultDon</div>
              <div><br>
              </div>
              <div>[1] <a
                  href="https://trac.osgeo.org/postgis/ticket/4860"
                  target="_blank" \
moz-do-not-send="true">https://trac.osgeo.org/postgis/ticket/4860</a></div>  </div>
            <div>[2] <a
href="https://github.com/postgis/postgis/commit/9522a6f869ee6d170d97e7c593d7e5d71ec02a9b"
                
                target="_blank" \
moz-do-not-send="true">https://github.com/postgis/postgis/commit/9522a6f869ee6d170d97e7c593d7e5d71ec02a9b</a></div>
  <div>[3] <a
href="https://drive.google.com/file/d/16FupiGJD69O75iW2eGAIErXuM-ncuP1p/view?usp=sharing"
                
                target="_blank" \
moz-do-not-send="true">https://drive.google.com/file/d/16FupiGJD69O75iW2eGAIErXuM-ncuP1p/view?usp=sharing</a></div>
  </div>
          _______________________________________________<br>
          postgis-users mailing list<br>
          <a href="mailto:postgis-users@lists.osgeo.org" target="_blank"
            moz-do-not-send="true">postgis-users@lists.osgeo.org</a><br>
          <a
            href="https://lists.osgeo.org/mailman/listinfo/postgis-users"
            rel="noreferrer" target="_blank" \
moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br> \
</blockquote>  </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" \
wrap="">_______________________________________________ postgis-users mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a> <a \
class="moz-txt-link-freetext" \
href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a>
 </pre>
    </blockquote>
  </body>
</html>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic