Re: [OpenIndiana-discuss] compiling PODOFO

2024-01-07 Thread Apostolos Syropoulos via openindiana-discuss
Thank you very much for your comment. This way is definitelythe way to compile 
using cmake. I am not really so familiar with 
cmake and my "hack" was really dirty.
Best regards,Apostolos
--Apostolos Syropoulos
Xanthi, Greece



 

On Sunday, January 7, 2024 at 02:42:05 PM GMT+2, Till Wegmueller 
 wrote:  
 
 Hi Apostolos

You can also set these variables via Commandline by using "-D". Examples 
the patch bellow can be exoressed as

 > $ export 
PKG_CONFIG_PATH=/usr/openssl/3.1/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig$ 
CC=/usr/bin/gcc-13 CXX=/usr/bin/g++-13 cmake 
-DPODOFO_BUILD_LIB_ONLY=FALSE -DPODOFO_BUILD_EXAMPLES=FALSE 
-DPODOFO_BUILD_TOOLS=TRUE -DPODOFO_BUILD_STATIC=TRUE ..$ make 
DESTDIR=/tmp/temp

Hope this helps
-Till

On 07.01.2024 12:50, Apostolos Syropoulos via openindiana-discuss wrote:
> I have finally managed to compile the podofo tools and the library butI was 
> mainly interested in the tools. First, I had to download the latestversion 
> from
> 
> https://github.com/podofo/podofo/tree/0.10.x
> For some reason, one cannot easily find this version...  Next, I "patched" 
> file
> CMakeLists.txt to create the tools (by default it creates a shared library). 
> Therequired changes are shown below:
> --- podofo-0.10.x/CMakeLists.txt    2023-12-13 12:25:04.0 +0200
> +++ podofo-0.10.x-NEW/CMakeLists.txt    2024-01-07 12:58:05.438243700 +0200
> @@ -43,6 +43,7 @@
>   # variable here that we require to be set elsewhere, otherwise we'll 
>complain.
>   set(PODOFO_MAIN_CMAKELISTS_READ TRUE)
>  
> +set(PODOFO_BUILD_LIB_ONLY FALSE)
>   if(PODOFO_BUILD_LIB_ONLY)
>   set(PODOFO_BUILD_TEST FALSE)
>   set(PODOFO_BUILD_EXAMPLES FALSE)
> @@ -53,11 +54,11 @@
>   endif()
>  
>   if (NOT DEFINED PODOFO_BUILD_EXAMPLES)
> -    set(PODOFO_BUILD_EXAMPLES TRUE)
> +    set(PODOFO_BUILD_EXAMPLES FALSE)
>   endif()
>  
>   if (NOT DEFINED PODOFO_BUILD_TOOLS)
> -    set(PODOFO_BUILD_TOOLS FALSE)
> +    set(PODOFO_BUILD_TOOLS TRUE)
>   endif()
>  
>   # We assume a standalone build so we set output
> @@ -72,7 +73,7 @@
>   message(FATAL_ERROR "PODOFO_BUILD_SHARED shouldn't be defined 
>externally. Set PODOFO_BUILD_STATIC to TRUE if you need a static build")
>   endif()
>  
> -option(PODOFO_BUILD_STATIC "Build static libraries (.a/.lib)" FALSE)
> +option(PODOFO_BUILD_STATIC "Build static libraries (.a/.lib)" TRUE)
>   if(PODOFO_BUILD_STATIC)
>   set(PODOFO_BUILD_SHARED FALSE)
>   add_compile_definitions(PODOFO_STATIC)
> Then I created a folder in which the build process would take place. There I 
> gave thefollowing commands to build the binaries:
> 
> $ export 
> PKG_CONFIG_PATH=/usr/openssl/3.1/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig$
>  CC=/usr/bin/gcc-13 CXX=/usr/bin/g++-13 cmake ..$ make
> 
> The binaries can be "installed" in /tmp/temp using the command
> $ make install DESTDIR=/tmp/temp . From, there one can copy them in any 
> location.
> Hope this will help others to build podofo easy.
> Regards,A.S.
> --Apostolos Syropoulos
> Xanthi, Greece
> 
> 
>  
> 
>      On Friday, January 5, 2024 at 09:53:42 PM GMT+2, Goetz T. Fischer 
> wrote:
>  
>  maybe you have to set a different c++ standard. enable verbose build to see 
>the actual g++ command.
> 
> On Fri, 5 Jan 2024 19:37:42 + (UTC), Apostolos Syropoulos via 
> openindiana-discuss wrote:
>> Hello,
>>
>> I tried to compile PODOFO with gcc 13 and I get the following error:
>>
>>
>> [ 65%] Building CXX object 
>> test/unit/CMakeFiles/podofo-test.dir/ParserTest.cpp.o
>> [ 65%] Building CXX object 
>> test/unit/CMakeFiles/podofo-test.dir/TokenizerTest.cpp.o
>> [ 66%] Building CXX object 
>> test/unit/CMakeFiles/podofo-test.dir/StringTest.cpp.o
>> In file included from /usr/include/cppunit/TestAssert.h:8,
> 
> ___
> openindiana-discuss mailing list
> openindiana-discuss@openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss
>    
> ___
> openindiana-discuss mailing list
> openindiana-discuss@openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss

___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss
  
___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] compiling PODOFO

2024-01-07 Thread Till Wegmueller

Hi Apostolos

You can also set these variables via Commandline by using "-D". Examples 
the patch bellow can be exoressed as


> $ export 
PKG_CONFIG_PATH=/usr/openssl/3.1/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig$ 
CC=/usr/bin/gcc-13 CXX=/usr/bin/g++-13 cmake 
-DPODOFO_BUILD_LIB_ONLY=FALSE -DPODOFO_BUILD_EXAMPLES=FALSE 
-DPODOFO_BUILD_TOOLS=TRUE -DPODOFO_BUILD_STATIC=TRUE ..$ make 
DESTDIR=/tmp/temp


Hope this helps
-Till

On 07.01.2024 12:50, Apostolos Syropoulos via openindiana-discuss wrote:

I have finally managed to compile the podofo tools and the library butI was 
mainly interested in the tools. First, I had to download the latestversion from

https://github.com/podofo/podofo/tree/0.10.x
For some reason, one cannot easily find this version...  Next, I "patched" file
CMakeLists.txt to create the tools (by default it creates a shared library). 
Therequired changes are shown below:
--- podofo-0.10.x/CMakeLists.txt    2023-12-13 12:25:04.0 +0200
+++ podofo-0.10.x-NEW/CMakeLists.txt    2024-01-07 12:58:05.438243700 +0200
@@ -43,6 +43,7 @@
  # variable here that we require to be set elsewhere, otherwise we'll complain.
  set(PODOFO_MAIN_CMAKELISTS_READ TRUE)
  
+set(PODOFO_BUILD_LIB_ONLY FALSE)

  if(PODOFO_BUILD_LIB_ONLY)
  set(PODOFO_BUILD_TEST FALSE)
  set(PODOFO_BUILD_EXAMPLES FALSE)
@@ -53,11 +54,11 @@
  endif()
  
  if (NOT DEFINED PODOFO_BUILD_EXAMPLES)

-    set(PODOFO_BUILD_EXAMPLES TRUE)
+    set(PODOFO_BUILD_EXAMPLES FALSE)
  endif()
  
  if (NOT DEFINED PODOFO_BUILD_TOOLS)

-    set(PODOFO_BUILD_TOOLS FALSE)
+    set(PODOFO_BUILD_TOOLS TRUE)
  endif()
  
  # We assume a standalone build so we set output

@@ -72,7 +73,7 @@
  message(FATAL_ERROR "PODOFO_BUILD_SHARED shouldn't be defined externally. Set 
PODOFO_BUILD_STATIC to TRUE if you need a static build")
  endif()
  
-option(PODOFO_BUILD_STATIC "Build static libraries (.a/.lib)" FALSE)

+option(PODOFO_BUILD_STATIC "Build static libraries (.a/.lib)" TRUE)
  if(PODOFO_BUILD_STATIC)
  set(PODOFO_BUILD_SHARED FALSE)
  add_compile_definitions(PODOFO_STATIC)
Then I created a folder in which the build process would take place. There I 
gave thefollowing commands to build the binaries:

$ export 
PKG_CONFIG_PATH=/usr/openssl/3.1/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig$ 
CC=/usr/bin/gcc-13 CXX=/usr/bin/g++-13 cmake ..$ make

The binaries can be "installed" in /tmp/temp using the command
$ make install DESTDIR=/tmp/temp . From, there one can copy them in any 
location.
Hope this will help others to build podofo easy.
Regards,A.S.
--Apostolos Syropoulos
Xanthi, Greece


  


 On Friday, January 5, 2024 at 09:53:42 PM GMT+2, Goetz T. Fischer 
 wrote:
  
  maybe you have to set a different c++ standard. enable verbose build to see the actual g++ command.


On Fri, 5 Jan 2024 19:37:42 + (UTC), Apostolos Syropoulos via 
openindiana-discuss wrote:

Hello,

I tried to compile PODOFO with gcc 13 and I get the following error:


[ 65%] Building CXX object test/unit/CMakeFiles/podofo-test.dir/ParserTest.cpp.o
[ 65%] Building CXX object 
test/unit/CMakeFiles/podofo-test.dir/TokenizerTest.cpp.o
[ 66%] Building CXX object test/unit/CMakeFiles/podofo-test.dir/StringTest.cpp.o
In file included from /usr/include/cppunit/TestAssert.h:8,


___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss
   
___

openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss


___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] compiling PODOFO

2024-01-07 Thread Apostolos Syropoulos via openindiana-discuss
I have finally managed to compile the podofo tools and the library butI was 
mainly interested in the tools. First, I had to download the latestversion from 

https://github.com/podofo/podofo/tree/0.10.x
For some reason, one cannot easily find this version...  Next, I "patched" file
CMakeLists.txt to create the tools (by default it creates a shared library). 
Therequired changes are shown below:
--- podofo-0.10.x/CMakeLists.txt    2023-12-13 12:25:04.0 +0200
+++ podofo-0.10.x-NEW/CMakeLists.txt    2024-01-07 12:58:05.438243700 +0200
@@ -43,6 +43,7 @@
 # variable here that we require to be set elsewhere, otherwise we'll complain.
 set(PODOFO_MAIN_CMAKELISTS_READ TRUE)
 
+set(PODOFO_BUILD_LIB_ONLY FALSE)
 if(PODOFO_BUILD_LIB_ONLY)
 set(PODOFO_BUILD_TEST FALSE)
 set(PODOFO_BUILD_EXAMPLES FALSE)
@@ -53,11 +54,11 @@
 endif()
 
 if (NOT DEFINED PODOFO_BUILD_EXAMPLES)
-    set(PODOFO_BUILD_EXAMPLES TRUE)
+    set(PODOFO_BUILD_EXAMPLES FALSE)
 endif()
 
 if (NOT DEFINED PODOFO_BUILD_TOOLS)
-    set(PODOFO_BUILD_TOOLS FALSE)
+    set(PODOFO_BUILD_TOOLS TRUE)
 endif()
 
 # We assume a standalone build so we set output
@@ -72,7 +73,7 @@
 message(FATAL_ERROR "PODOFO_BUILD_SHARED shouldn't be defined externally. 
Set PODOFO_BUILD_STATIC to TRUE if you need a static build")
 endif()
 
-option(PODOFO_BUILD_STATIC "Build static libraries (.a/.lib)" FALSE)
+option(PODOFO_BUILD_STATIC "Build static libraries (.a/.lib)" TRUE)
 if(PODOFO_BUILD_STATIC)
 set(PODOFO_BUILD_SHARED FALSE)
 add_compile_definitions(PODOFO_STATIC)
Then I created a folder in which the build process would take place. There I 
gave thefollowing commands to build the binaries:

$ export 
PKG_CONFIG_PATH=/usr/openssl/3.1/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig$ 
CC=/usr/bin/gcc-13 CXX=/usr/bin/g++-13 cmake ..$ make

The binaries can be "installed" in /tmp/temp using the command
$ make install DESTDIR=/tmp/temp . From, there one can copy them in any 
location.
Hope this will help others to build podofo easy.
Regards,A.S.
--Apostolos Syropoulos
Xanthi, Greece


 

On Friday, January 5, 2024 at 09:53:42 PM GMT+2, Goetz T. Fischer 
 wrote:  
 
 maybe you have to set a different c++ standard. enable verbose build to see 
the actual g++ command.

On Fri, 5 Jan 2024 19:37:42 + (UTC), Apostolos Syropoulos via 
openindiana-discuss wrote:
> Hello,
> 
> I tried to compile PODOFO with gcc 13 and I get the following error:
> 
> 
> [ 65%] Building CXX object 
> test/unit/CMakeFiles/podofo-test.dir/ParserTest.cpp.o
> [ 65%] Building CXX object 
> test/unit/CMakeFiles/podofo-test.dir/TokenizerTest.cpp.o
> [ 66%] Building CXX object 
> test/unit/CMakeFiles/podofo-test.dir/StringTest.cpp.o
> In file included from /usr/include/cppunit/TestAssert.h:8,

___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss
  
___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] compiling PODOFO

2024-01-05 Thread Goetz T. Fischer
maybe you have to set a different c++ standard. enable verbose build to see the 
actual g++ command.

On Fri, 5 Jan 2024 19:37:42 + (UTC), Apostolos Syropoulos via 
openindiana-discuss wrote:
> Hello,
> 
> I tried to compile PODOFO with gcc 13 and I get the following error:
> 
> 
> [ 65%] Building CXX object 
> test/unit/CMakeFiles/podofo-test.dir/ParserTest.cpp.o
> [ 65%] Building CXX object 
> test/unit/CMakeFiles/podofo-test.dir/TokenizerTest.cpp.o
> [ 66%] Building CXX object 
> test/unit/CMakeFiles/podofo-test.dir/StringTest.cpp.o
> In file included from /usr/include/cppunit/TestAssert.h:8,

___
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss


[OpenIndiana-discuss] compiling PODOFO

2024-01-05 Thread Apostolos Syropoulos via openindiana-discuss
Hello,

I tried to compile PODOFO with gcc 13 and I get the following error:


[ 65%] Building CXX object test/unit/CMakeFiles/podofo-test.dir/ParserTest.cpp.o
[ 65%] Building CXX object 
test/unit/CMakeFiles/podofo-test.dir/TokenizerTest.cpp.o
[ 66%] Building CXX object test/unit/CMakeFiles/podofo-test.dir/StringTest.cpp.o
In file included from /usr/include/cppunit/TestAssert.h:8,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /container/source/var/podofo-0.9.7/test/unit/StringTest.h:24,
from /container/source/var/podofo-0.9.7/test/unit/StringTest.cpp:21:
/usr/include/cppunit/tools/StringHelper.h: In instantiation of 'typename 
std::enable_if<(! std::is_enum<_Tp>::value), std::__cxx11::basic_string >::type 
CppUnit::StringHelper::toString(const T&) [with T = PoDoFo::PdfString; typename 
std::enable_if<(! std::is_enum<_Tp>::value), std::__cxx11::basic_string >::type 
= std::__cxx11::basic_string]':
/usr/include/cppunit/TestAssert.h:74:50: required from 'static std::string 
CppUnit::assertion_traits::toString(const T&) [with T = PoDoFo::PdfString; 
std::string = std::__cxx11::basic_string]'
/usr/include/cppunit/TestAssert.h:168:58: required from 'void 
CppUnit::assertEquals(const T&, const T&, SourceLine, const std::string&) [with 
T = PoDoFo::PdfString; std::string = std::__cxx11::basic_string]'
/container/source/var/podofo-0.9.7/test/unit/StringTest.cpp:182:5: required 
from here
/usr/include/cppunit/tools/StringHelper.h:25:9: error: no match for 
'operator<<' (operand types are 'CppUnit::OStringStream' {aka 
'std::__cxx11::basic_ostringstream'} and 'const PoDoFo::PdfString')
25 | ost << x;
| ^~~~
In file included from /usr/gcc/13/include/c++/13.2.0/istream:41,
from /usr/gcc/13/include/c++/13.2.0/sstream:40,
from /usr/include/cppunit/portability/Stream.h:283,
from /usr/include/cppunit/TestAssert.h:7:
/usr/gcc/13/include/c++/13.2.0/ostream:110:7: note: candidate: 
'std::basic_ostream<_CharT, _Traits>::__ostream_type& 
std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& 
()(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits; 
__ostream_type = std::basic_ostream]'
110 | operator<<(__ostream_type& (__pf)(__ostream_type&))
| ^~~~
/usr/gcc/13/include/c++/13.2.0/ostream:110:36: note: no known conversion for 
argument 1 from 'const PoDoFo::PdfString' to 
'std::basic_ostream::__ostream_type& ()(std::basic_ostream::__ostream_type&)' 
{aka 'std::basic_ostream& ()(std::basic_ostream&)'}
110 | operator<<(__ostream_type& (__pf)(__ostream_type&))
| ~~^~
/usr/gcc/13/include/c++/13.2.0/ostream:119:7: note: candidate: 
'std::basic_ostream<_CharT, _Traits>::__ostream_type& 
std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& ()(__ios_type&)) 
[with _CharT = char; _Traits = std::char_traits; __ostream_type = 
std::basic_ostream; __ios_type = std::basic_ios]'
119 | operator<<(__ios_type& (__pf)(__ios_type&))
| ^~~~
/usr/gcc/13/include/c++/13.2.0/ostream:119:32: note: no known conversion for 
argument 1 from 'const PoDoFo::PdfString' to 'std::basic_ostream::__ios_type& 
()(std::basic_ostream::__ios_type&)' {aka 'std::basic_ios& ()(std::basic_ios&)'}
119 | operator<<(__ios_type& (__pf)(__ios_type&))
| ~~^~
/usr/gcc/13/include/c++/13.2.0/ostream:129:7: note: candidate: 
'std::basic_ostream<_CharT, _Traits>::__ostream_type& 
std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& 
()(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits; 
__ostream_type = std::basic_ostream]'
129 | operator<<(ios_base& (__pf) (ios_base&))
| ^~~~
/usr/gcc/13/include/c++/13.2.0/ostream:129:30: note: no known conversion for 
argument 1 from 'const PoDoFo::PdfString' to 'std::ios_base& ()(std::ios_base&)'
129 | operator<<(ios_base& (__pf) (ios_base&))
| ^
/usr/gcc/13/include/c++/13.2.0/ostream:168:7: note: candidate: 
'std::basic_ostream<_CharT, _Traits>::__ostream_type& 
std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; 
_Traits = std::char_traits; __ostream_type = std::basic_ostream]'
168 | operator<<(long __n)
| ^~~~
/usr/gcc/13/include/c++/13.2.0/ostream:168:23: note: no known conversion for 
argument 1 from 'const PoDoFo::PdfString' to 'long int'
168 | operator<<(long __n)
| ~^~~
/usr/gcc/13/include/c++/13.2.0/ostream:172:7: note: candidate: 
'std::basic_ostream<_CharT, _Traits>::__ostream_type& 
std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT 
= char; _Traits = std::char_traits; __ostream_type = std::basic_ostream]'
172 | operator<<(unsigned long __n)
| ^~~~
/usr/gcc/13/include/c++/13.2.0/ostream:172:32: note: no known conversion for 
argument 1 from 'const PoDoFo::PdfString' to 'long unsigned int'
172 | operator<<(unsigned long __n)
| ~~^~~
/usr/gcc/13/include/c++/13.2.0/ostream:176:7: note: candidate: