graphics/cuneiform

It's not really important for me, but I want know why this happens.

graphics/cuneiform have a lot of error while compiling.

If I set
Code:
CONFIGURE_ARGS="MAGICKCORE_QUANTUM_DEPTH=8" CONFIGURE_ARGS="MAGICKCORE_HDRI_ENABLE=Yes"

There are no more error till 100% compile. But then is a linker-error:

Code:
Linking CXX executable ../../cuneiform
CMakeFiles/cuneiform-cli.dir/cuneiform-cli.cpp.o: In function `main':
/usr/ports/graphics/cuneiform/work/cuneiform-linux-1.1.0/cuneiform_src/cli/cuneiform-cli.cpp:(.text+0x5de): undefined reference to `Magick::Image::Image(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/ports/graphics/cuneiform/work/cuneiform-linux-1.1.0/cuneiform_src/cli/cuneiform-cli.cpp:(.text+0x644): undefined reference to `Magick::Image::write(Magick::Blob*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
--- cuneiform ---
*** [cuneiform] Error code 1

In the Internet I found a lot of posts about this error, but no really explanation. I think it is something with graphics/GraphicsMagick libraries.
Poudriere compiles fine. (I compared the options between poudriere and port, they seen nearly the same).
 
Last edited:
Found it, was a namespace problem:
Here the patch, I post it later on Bugzilla, need to fix some syntax errors (parenthesis and conditionals), but now compiles till the end without additional flags.

Code:
-- cuneiform_src/cli/cuneiform-cli.cpp.orig   2015-07-08 09:26:05 UTC
+++ cuneiform_src/cli/cuneiform-cli.cpp
@@ -152,7 +152,8 @@ static string supported_formats() {
  */
static char* read_file(const char *fname);
-#ifdef USE_MAGICK
+#ifndef USE_MAGICK
+#define USE_MAGICK
#include <Magick++.h>
using namespace Magick;
@@ -337,7 +338,9 @@ int main(int argc, char **argv) {
  return 0;
  }
-#ifdef USE_MAGICK
+#ifndef USE_MAGICK
#define USE_MAGICK
+#include <Magick++.h>
+using namespace Magick;
  Magick::InitializeMagick("");
#endif

and this one I you want it compile with cpp48

Code:
--- cuneiform_src/Kern/hrkint/stdprt.h.orig  2015-07-08 11:24:29 UTC
+++ cuneiform_src/Kern/hrkint/stdprt.h
@@ -58,6 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#define __STDPRT_H
#include "std.h"
+#include <cstdarg>
typedef int32_t HEvent32;
typedef struct tagStdPrtEvent


But the question is why poudriere can handle this, and why it has not work in the port before?. Has somebody an explanation ? (Please, no answers like: "Enviroment error").
 
The most other warnings I wanted to fix, caused by the different warnings defaults. (Will be a lot of work). Clang had a lot of warnings, gcc48 nearly none. So I let be to patch other files and posted the above patches under .PR 201424
 
Back
Top