package/poppler: fix build with cmake < 3.10
PATCH 1/1 package/poppler: fix build with cmake < 3.10
Fixes:
- http://autobuild.buildroot.org/results/f9e24d38d3aa4519615c5a0ae7f62af610df976f
--- package/poppler/poppler.mk | 3 +++ 1 file changed, 3 insertions(+)
package/poppler/poppler.mk +3 -0
@@ -20,6 +20,9 @@ POPPLER_CONF_OPTS = \ -DENABLE_GOBJECT_INTROSPECTION=OFF \ -DENABLE_GTK_DOC=OFF +# cmake older than 3.10 require this to avoid try_run() in FindThreads +POPPLER_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF + ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) POPPLER_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" endif
Signature · 1 line
2.20.1
PATCH 1/1 package/poppler: fix build with cmake < 3.10
Quoted 13 lines · Fabrice Fontaine
Fixes:
- http://autobuild.buildroot.org/results/f9e24d38d3aa4519615c5a0ae7f62af610df976fSigned-off-by Fabrice Fontaine <[email protected]>--- package/poppler/poppler.mk | 3 +++ 1 file changed, 3 insertions(+)package/poppler/poppler.mk +0
-0
package/poppler/poppler.mk POPPLER_CONF_OPTS = \ · line 24
Quoted 5 lines
package/poppler/poppler.mk +2
-0@@ -20,6 +20,9 @@ POPPLER_CONF_OPTS = \ -DENABLE_GOBJECT_INTROSPECTION=OFF \ -DENABLE_GTK_DOC=OFF +# cmake older than 3.10 require this to avoid try_run() in FindThreads +POPPLER_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF
This made no sense to me: we do have threads (because we depend on it), and the
compiler does accept the -pthread argument (and it is preferred over -lpthread for static scenarios), so why set it to OFF?
In addition, the key option is THREAD_HAVE_PTHREAD_ARG, not THREAD_PTHREAD_ARG.
So I changed the patch to set THREAD_HAVE_PTHREAD_ARG=ON.
Note that static linking still fails horribly with dozens of missing libraries
(cfr. [1]). I think we should disable it for static.
Regards,
Arnout
[1] http://autobuild.buildroot.net/results/e409863724005a0c182476612187a322a16a7db8
Quoted 5 lines
package/poppler/poppler.mk +1
-0+ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) POPPLER_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" endif
PATCH 1/1 package/poppler: fix build with cmake < 3.10
Quoted 26 lines · Arnout Vandecappelle
Quoted 13 lines · Fabrice Fontaine
Fixes:
- http://autobuild.buildroot.org/results/f9e24d38d3aa4519615c5a0ae7f62af610df976fSigned-off-by Fabrice Fontaine <[email protected]>--- package/poppler/poppler.mk | 3 +++ 1 file changed, 3 insertions(+)package/poppler/poppler.mk +0
-0package/poppler/poppler.mk POPPLER_CONF_OPTS = \ · line 24
Quoted 5 lines
package/poppler/poppler.mk +2
-0@@ -20,6 +20,9 @@ POPPLER_CONF_OPTS = \ -DENABLE_GOBJECT_INTROSPECTION=OFF \ -DENABLE_GTK_DOC=OFF +# cmake older than 3.10 require this to avoid try_run() in FindThreads +POPPLER_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFFThis made no sense to me: we do have threads (because we depend on it), and the
compiler does accept the -pthread argument (and it is preferred over -lpthread for static scenarios), so why set it to OFF?
Quoted 3 lines
In addition, the key option is
THREAD_HAVE_PTHREAD_ARG, notTHREAD_PTHREAD_ARG.So I changed the patch to set THREAD_HAVE_PTHREAD_ARG=ON.
... and applied to master, thanks. In case it wasn't obvious :-)
Regards,
Arnout
Quoted 14 lines
Note that static linking still fails horribly with dozens of missing libraries
(cfr. [1]). I think we should disable it for static.Regards,
Arnout[1] http://autobuild.buildroot.net/results/e409863724005a0c182476612187a322a16a7db8
Quoted 5 lines
package/poppler/poppler.mk +1
-0+ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) POPPLER_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" endif
PATCH 1/1 package/poppler: fix build with cmake < 3.10
Dear Arnout,
Le sam. 8 juin 2019 ? 21:41, Arnout Vandecappelle <[email protected]> a ?crit :
Quoted 23 lines · Arnout Vandecappelle
Quoted 19 lines · Fabrice Fontaine
Quoted 16 lines
Fixes:
- http://autobuild.buildroot.org/results/f9e24d38d3aa4519615c5a0ae7f62af610df976fSigned-off-by Fabrice Fontaine <[email protected]>--- package/poppler/poppler.mk | 3 +++ 1 file changed, 3 insertions(+)package/poppler/poppler.mk +0
-0@@ -20,6 +20,9 @@ POPPLER_CONF_OPTS = \ -DENABLE_GOBJECT_INTROSPECTION=OFF \ -DENABLE_GTK_DOC=OFF
Quoted 8 lines
Quoted 8 lines
package/poppler/poppler.mk POPPLER_CONF_OPTS = \ · line 24
Quoted 2 lines
package/poppler/poppler.mk +2
-0+# cmake older than 3.10 require this to avoid try_run() in FindThreads +POPPLER_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFFThis made no sense to me: we do have threads (because we depend on it), and the
compiler does accept the -pthread argument (and it is preferred over -lpthread for static scenarios), so why set it to OFF?In addition, the key option is
THREAD_HAVE_PTHREAD_ARG, notTHREAD_PTHREAD_ARG.
We're already passing -DTHREADS_PTHREAD_ARG=OFF to exiv2, i2pd, rabbitmq-c, xerces, librtlsdr, libssh and paho-mqtt-cpp. The commit message of librltsdr commit [1] specifies that setting this variable to OFF only disable the TRY_RUN call.
Should we update all these packages to use your new proposal?
Quoted 22 lines
Quoted 2 lines
So I changed the patch to set THREAD_HAVE_PTHREAD_ARG=ON.
... and applied to master, thanks. In case it wasn't obvious :-)
Regards,
ArnoutQuoted 14 lines
Note that static linking still fails horribly with dozens of missing libraries
(cfr. [1]). I think we should disable it for static.Regards,
Arnout[1] http://autobuild.buildroot.net/results/e409863724005a0c182476612187a322a16a7db8
Quoted 5 lines
package/poppler/poppler.mk +1
-0+ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) POPPLER_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" endif
Best Regards,
Fabrice
PATCH 1/1 package/poppler: fix build with cmake < 3.10
Quoted 33 lines · Fabrice Fontaine
Dear Arnout,
Le sam. 8 juin 2019 ? 21:41, Arnout Vandecappelle <[email protected]> a ?crit :
Quoted 30 lines · Arnout Vandecappelle
Quoted 26 lines · Fabrice Fontaine
Quoted 13 lines
Fixes:
- http://autobuild.buildroot.org/results/f9e24d38d3aa4519615c5a0ae7f62af610df976fSigned-off-by Fabrice Fontaine <[email protected]>--- package/poppler/poppler.mk | 3 +++ 1 file changed, 3 insertions(+)package/poppler/poppler.mk +0
-0package/poppler/poppler.mk POPPLER_CONF_OPTS = \ · line 24
Quoted 5 lines
package/poppler/poppler.mk +2
-0@@ -20,6 +20,9 @@ POPPLER_CONF_OPTS = \ -DENABLE_GOBJECT_INTROSPECTION=OFF \ -DENABLE_GTK_DOC=OFF +# cmake older than 3.10 require this to avoid try_run() in FindThreads +POPPLER_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFFThis made no sense to me: we do have threads (because we depend on it), and the
compiler does accept the -pthread argument (and it is preferred over -lpthread for static scenarios), so why set it to OFF?
Quoted 5 lines
Quoted 1 line
Quoted 1 line
In addition, the key option is
THREAD_HAVE_PTHREAD_ARG, notTHREAD_PTHREAD_ARG.We're already passing -DTHREADS_PTHREAD_ARG=OFF to exiv2, i2pd, rabbitmq-c, xerces, librtlsdr, libssh and paho-mqtt-cpp. The commit message of librltsdr commit [1] specifies that setting this variable to OFF only disable the
TRY_RUNcall.
Argh, I shouldn't be fixing things up like that while applying :-(
Of course, we should primarily be consistent. So I pushed a follow-up commit
that reverts it to your version.
That said...
Quoted 1 line
Should we update all these packages to use your new proposal?
Indeed, I think we should use THREAD_HAVE_PTHREAD_ARG.
Unfortunately, I can't seem to reproduce the original issue with librtlsdr -
there might be something there that would not get fixed by my proposal.
Also, I think it's plain silly that we do this thing for each individual
package that tries to use threads. It should be part of the toolchainfile.cmake. But then, of course, the setting should depend on the availability of threads.
Regards,
Arnout
Quoted 28 lines
Quoted 22 lines
Quoted 2 lines
So I changed the patch to set THREAD_HAVE_PTHREAD_ARG=ON.
... and applied to master, thanks. In case it wasn't obvious :-)
Regards,
ArnoutQuoted 14 lines
Note that static linking still fails horribly with dozens of missing libraries
(cfr. [1]). I think we should disable it for static.Regards,
Arnout[1] http://autobuild.buildroot.net/results/e409863724005a0c182476612187a322a16a7db8
Quoted 5 lines
package/poppler/poppler.mk +1
-0+ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) POPPLER_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" endifBest Regards,
Fabrice