Bug 201424 - graphics/cuneiform namespace error
Summary: graphics/cuneiform namespace error
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-07-08 13:17 UTC by Walter Schwarzenfeld
Modified: 2016-08-17 18:56 UTC (History)
7 users (show)

See Also:
bugzilla: maintainer-feedback? (samm)


Attachments
patch-stdprt_h (287 bytes, patch)
2015-09-15 22:41 UTC, Walter Schwarzenfeld
no flags Details | Diff
patch-cuneiform-cli-cpp (561 bytes, patch)
2015-09-15 22:50 UTC, Walter Schwarzenfeld
no flags Details | Diff
cuneiform.diff (1.93 KB, patch)
2015-09-30 14:28 UTC, Walter Schwarzenfeld
no flags Details | Diff
cuniform patch with mandatory ImageMagick (2.97 KB, patch)
2015-10-15 11:32 UTC, Torsten Zühlsdorff
no flags Details | Diff
cuneiform.diff (3.14 KB, patch)
2015-10-18 02:43 UTC, Walter Schwarzenfeld
no flags Details | Diff
cuneiform.diff (3.14 KB, patch)
2015-10-18 03:40 UTC, Walter Schwarzenfeld
no flags Details | Diff
cuneiform.diff (3.18 KB, patch)
2015-10-19 08:00 UTC, Walter Schwarzenfeld
no flags Details | Diff
cuneiform.diff (3.18 KB, patch)
2015-10-19 08:08 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff_graphics_cuneiform (1.25 KB, patch)
2016-01-11 16:00 UTC, Walter Schwarzenfeld
no flags Details | Diff
portlint_graphics_cuneiform (9.94 KB, text/plain)
2016-01-11 16:01 UTC, Walter Schwarzenfeld
no flags Details
poudriere_graphics_cuneiform-1.1.0.5.log (41.82 KB, application/gzip)
2016-01-11 17:36 UTC, Walter Schwarzenfeld
no flags Details
svn-diff_graphics_cuneiform_new (28.64 KB, patch)
2016-06-07 17:02 UTC, Walter Schwarzenfeld
no flags Details | Diff
patch-cuneiform (27.77 KB, patch)
2016-06-10 11:53 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Schwarzenfeld 2015-07-08 13:17:50 UTC

    
Comment 1 Walter Schwarzenfeld 2015-07-08 13:20:43 UTC
graphics/cuneiform exits compilation in port with:

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

but compiles with poudriere.

If I do this patch

-- 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

it compiles fine.


Other errors appears with gcc48, but this patch

--- 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

helps.
Comment 2 Walter Schwarzenfeld 2015-07-08 13:31:25 UTC
10.1-RELEASE-p13 FreeBSD 10.1-RELEASE-p13 #0: Wed Jul  1 04:03:12 CEST 2015     root@user:/usr/obj/usr/src/sys/GENERIC  amd64
Comment 3 Carlo Strub freebsd_committer freebsd_triage 2015-09-15 22:28:37 UTC
please provide your patch in a proper patch file.
Comment 4 Walter Schwarzenfeld 2015-09-15 22:41:26 UTC
Created attachment 161087 [details]
patch-stdprt_h
Comment 5 Walter Schwarzenfeld 2015-09-15 22:50:20 UTC
Created attachment 161088 [details]
patch-cuneiform-cli-cpp
Comment 6 Walter Schwarzenfeld 2015-09-15 23:02:12 UTC
I set USE_GCC=4.8+ in the Makefile. Clang throws a lot of warnings. Don't know if this is necessairely.
Comment 7 Walter Schwarzenfeld 2015-09-30 14:28:42 UTC
Created attachment 161574 [details]
cuneiform.diff
Comment 8 Torsten Zühlsdorff 2015-10-15 11:32:42 UTC
Created attachment 162064 [details]
cuniform patch with mandatory ImageMagick

Hello,

Walter asked for my help, because there is no visible progress in this ticket.

I did some changes to his patch:
- add the missing pump of PORTREVISION
- remove the option to choose IMAGEMAGICK

With the patch the port compiles fine as long as ImageMagick is installed. Without the software it is not possible to compile - whether via make or poudriere. Therefore i make ImageMagick a mandatory LIB_DEPENDS and remove all conditionals to check this.

No it builds fine for 9.3, 10.1 and 10.2 - all amd64.

Patch and Logs attached.
Comment 9 Torsten Zühlsdorff 2015-10-15 11:36:43 UTC
An example poudriere log created for FreeBSD 10.2 AMD64 can be found here. Attention it has a size of 3.6 MB:
http://ports.toco-domains.de/poudriere-test-logs/cuneiform-1.1.0_5.log
Comment 10 Walter Schwarzenfeld 2015-10-18 02:43:06 UTC
Created attachment 162185 [details]
cuneiform.diff
Comment 11 Walter Schwarzenfeld 2015-10-18 02:44:44 UTC
Correct Makefile, cause of portlint. Also tested on 9.3 and 10.2 i386.
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-18 03:22:22 UTC
@walter, I see two patches here, which makes how to progress this issue ambiguous for committers.

We need one patch, that is approved by the maintainer and QA tested. Please provide instructions.
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-18 03:22:46 UTC
Make that "I see 3 patches here"
Comment 14 Walter Schwarzenfeld 2015-10-18 03:40:53 UTC
Created attachment 162187 [details]
cuneiform.diff
Comment 15 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-18 03:43:12 UTC
Pending maintainer-approval + on one of the patches.

@torsten, walter, can you please coordinate among yourselves which patch should be approved/obsoleted, leaving one patch to commit, thanks!
Comment 16 Walter Schwarzenfeld 2015-10-18 03:53:05 UTC
I found no way to obsolete Thorstens diff. Take the last one.
Comment 17 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-18 04:12:38 UTC
@walter, Torsten will need to obsolete it
Comment 18 Walter Schwarzenfeld 2015-10-18 04:15:06 UTC
I mailed him.
Comment 19 Torsten Zühlsdorff 2015-10-19 07:39:40 UTC
(In reply to Walter Schwarzenfeld from comment #18)

As requested i obsoleted my patch. :)

@Walter: Your patch removed the LIB_DEPENDENCY. In your mail you suggest that the LIB_DEPENDENCY now is mandatory and not removed. Can you check this again please?

Thanks,
Torsten
Comment 20 Walter Schwarzenfeld 2015-10-19 08:00:51 UTC
Created attachment 162197 [details]
cuneiform.diff
Comment 21 Walter Schwarzenfeld 2015-10-19 08:03:27 UTC
LIB_DEPENCY was not meant. Only the conditions.
Comment 22 Walter Schwarzenfeld 2015-10-19 08:08:10 UTC
Created attachment 162198 [details]
cuneiform.diff
Comment 23 Walter Schwarzenfeld 2015-10-24 21:48:07 UTC
Is it now ok?
Comment 24 Torsten Zühlsdorff 2016-01-11 14:57:23 UTC
Seems we run into a maintainer approval timeout.
Comment 25 Oleksii Samorukov freebsd_committer freebsd_triage 2016-01-11 15:39:44 UTC
Sorry for delay with reply, please commit and thank you for the patch
Comment 26 Walter Schwarzenfeld 2016-01-11 16:00:58 UTC
Created attachment 165398 [details]
svn-diff_graphics_cuneiform
Comment 27 Walter Schwarzenfeld 2016-01-11 16:01:33 UTC
Created attachment 165399 [details]
portlint_graphics_cuneiform
Comment 28 Walter Schwarzenfeld 2016-01-11 16:02:25 UTC
Add USE_GCC=4.8+ (to silence a bunch of error messages with clang).
Comment 29 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-11 16:42:32 UTC
Approval was for attachment 165398 [details], which was replaced with attachment 165399 [details] after approval.

Maintainer, this needs your review and approval once more.

@Walter:

Feel free to omit the -v flag for portlint(8) to only include warnings and failures.

Please also confirm this passes build and package testing with poudriere, or if not yet installed, attach the output of:

make stage && make check-plist && make stage-qa && make package

Thanks!
Comment 30 Walter Schwarzenfeld 2016-01-11 17:36:05 UTC
Created attachment 165406 [details]
poudriere_graphics_cuneiform-1.1.0.5.log
Comment 31 Torsten Zühlsdorff 2016-04-12 12:48:48 UTC
After nearly 3 month we can consider this as maintainer timeout and go ahead.
Comment 32 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2016-06-07 11:43:17 UTC
Hello Walter,

the patch did not apply any more. Can you please provide a new one? I will take care of the PR.

Greetings,
Torsten
Comment 33 Walter Schwarzenfeld 2016-06-07 17:02:25 UTC
Created attachment 171156 [details]
svn-diff_graphics_cuneiform_new
Comment 34 Walter Schwarzenfeld 2016-06-07 17:14:07 UTC
Silenced some warnings.
Can't obsolete old diff, I don't see it under obsolete patch, only the new.
Comment 35 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2016-06-10 11:17:06 UTC
Hello Walter,

the patch did not apply:

$ make patch
===>  License BSD3CLAUSE accepted by the user
===>   cuneiform-1.1.0_5 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by cuneiform-1.1.0_5 for building
===>  Extracting for cuneiform-1.1.0_5
=> SHA256 Checksum OK for cuneiform-linux-1.1.0.tar.bz2.
===>  Patching for cuneiform-1.1.0_5
===>  Applying FreeBSD patches for cuneiform-1.1.0_5
  I can't seem to find a patch in there anywhere.
=> Patch patch-cuneiform__src_Kern_rimage_sources_main_cricontrol.cpp failed to apply cleanly.
=> Patch(es) patch-CTDIB.cpp patch-c_trans_h patch-clu_test.c patch-cor_spel_c patch-cuneiform-cli-cpp applied cleanly.
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/cuneiform
Comment 36 Walter Schwarzenfeld 2016-06-10 11:53:27 UTC
Created attachment 171263 [details]
patch-cuneiform
Comment 37 Walter Schwarzenfeld 2016-06-10 11:54:13 UTC
I have some problems with svn with this port, I hope the new patch will work now.
Comment 38 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2016-06-10 12:05:26 UTC
Patch applies now - start testbuilds. :)
Comment 39 Walter Schwarzenfeld 2016-08-17 18:56:17 UTC
Patch obsolete, should reworked. I close this PR.