Skip to contentSkip to conversation

package/poppler: really disable test programs

PATCH New Fabrice Fontaine 2 participants 5 messages Jan 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/poppler: really disable test programs

---
 ...1-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch
package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch new file +32 -0
new file mode 100644
index 0000000000..476676199a
@@ -0,0 +1,32 @@
+From ccc5f765c37b2d65e2e0b64d92326997f90acb3e Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 11 Jan 2020 12:37:07 +0100
+Subject: [PATCH] CMakeLists.txt: fix BUILD_CPP_TESTS
+
+Do not build programs under the test directory if BUILD_CPP_TESTS is OFF
+as this directory contains multiple C++ test executables
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status:
+https://gitlab.freedesktop.org/poppler/poppler/merge_requests/490]
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c182d146..d159582b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -677,7 +677,9 @@ endif()
+ if(ENABLE_GLIB)
+   add_subdirectory(glib)
+ endif()
++if(BUILD_CPP_TESTS)
+ add_subdirectory(test)
++endif()
+ if(ENABLE_QT5)
+   add_subdirectory(qt5)
+ endif()
+-- 
+2.24.1
+
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/1 package/poppler: really disable test programs

Quoted 12 lines · On Sat, 11 Jan 2020 12:50:54 +0100 Fabrice Fontaine…
---
 ...1-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch
package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch new file +0 -0
new file mode 100644
index 0000000000..476676199a

package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch line 7

Quoted 7 lines
package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch new file +7 -0
@@ -0,0 +1,32 @@
+From ccc5f765c37b2d65e2e0b64d92326997f90acb3e Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 11 Jan 2020 12:37:07 +0100
+Subject: [PATCH] CMakeLists.txt: fix BUILD_CPP_TESTS
+
+Do not build programs under the test directory if BUILD_CPP_TESTS is OFF
+as this directory contains multiple C++ test executables

What is the problem with C++ executables, since poppler depends on C++ anyway ?

Of course, it is good to disable building tests if possible, but I'm just curious to understand the motivation for the change: did you encounter a build failure? Or it is just that you realized the tests were being built while they should not?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/poppler: really disable test programs

Dear Thomas,

Le sam. 11 janv. 2020 ? 15:35, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 27 lines
Quoted 12 lines · On Sat, 11 Jan 2020 12:50:54 +0100 Fabrice Fontaine…
---
 ...1-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch
package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch new file +0 -0
new file mode 100644
index 0000000000..476676199a

package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch line 7

Quoted 7 lines
package/poppler/0001-CMakeLists.txt-fix-BUILD_CPP_TESTS.patch new file +7 -0
@@ -0,0 +1,32 @@
+From ccc5f765c37b2d65e2e0b64d92326997f90acb3e Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 11 Jan 2020 12:37:07 +0100
+Subject: [PATCH] CMakeLists.txt: fix BUILD_CPP_TESTS
+
+Do not build programs under the test directory if BUILD_CPP_TESTS is OFF
+as this directory contains multiple C++ test executables

What is the problem with C++ executables, since poppler depends on C++ anyway ?

Quoted 4 lines

Of course, it is good to disable building tests if possible, but I'm just curious to understand the motivation for the change: did you encounter a build failure? Or it is just that you realized the tests were being built while they should not?

Following your comment on the leveldb patch that was fixing the -latomic build failure, I'm going through the different -latomic workarounds used in the cmake packages.
I'm trying to replace these workarounds by upstreamable patches. However, in some cases such as libraries (like poppler) these workarounds/patches are not strictly needed if we don't build any executable.

Quoted 8 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice

#3 lore raw

PATCH 1/1 package/poppler: really disable test programs

Quoted 7 lines · On Sat, 11 Jan 2020 15:44:44 +0100 Fabrice Fontaine…
Quoted 7 lines

What is the problem with C++ executables, since poppler depends on C++ anyway ?

Of course, it is good to disable building tests if possible, but I'm just curious to understand the motivation for the change: did you encounter a build failure? Or it is just that you realized the tests were being built while they should not?

Quoted 7 lines

Following your comment on the leveldb patch that was fixing the -latomic build failure, I'm going through the different -latomic workarounds used in the cmake packages.
I'm trying to replace these workarounds by upstreamable patches. However, in some cases such as libraries (like poppler) these workarounds/patches are not strictly needed if we don't build any executable.

It's not true: if libpoppler.so uses some symbols that are defined in libatomic.so, then it should link against libatomic.so (i.e libpoppler.so should have a DT_NEEDED entry for libatomic.so). Otherwise any application linking against libpoppler.so will have to know that it should also link against libatomic.so, which is not good.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 package/poppler: really disable test programs

Le sam. 11 janv. 2020 ? 17:08, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 19 lines
Quoted 7 lines · On Sat, 11 Jan 2020 15:44:44 +0100 Fabrice Fontaine…
Quoted 7 lines

What is the problem with C++ executables, since poppler depends on C++ anyway ?

Of course, it is good to disable building tests if possible, but I'm just curious to understand the motivation for the change: did you encounter a build failure? Or it is just that you realized the tests were being built while they should not?

Quoted 7 lines

Following your comment on the leveldb patch that was fixing the -latomic build failure, I'm going through the different -latomic workarounds used in the cmake packages.
I'm trying to replace these workarounds by upstreamable patches. However, in some cases such as libraries (like poppler) these workarounds/patches are not strictly needed if we don't build any executable.

Quoted 5 lines

It's not true: if libpoppler.so uses some symbols that are defined in libatomic.so, then it should link against libatomic.so (i.e libpoppler.so should have a DT_NEEDED entry for libatomic.so). Otherwise any application linking against libpoppler.so will have to know that it should also link against libatomic.so, which is not good.

OK, then I'll make a patch for poppler and sent it upstream.

Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice