[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

            Bug ID: 238780
           Summary: converters/pdf2djvu: fix build with GCC-based
                    architectures
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: [hidden email]
          Reporter: [hidden email]
                CC: [hidden email]
             Flags: maintainer-feedback?([hidden email])
                CC: [hidden email]

Created attachment 205301
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=205301&action=edit
patch

When compiling with GCC, as used on GCC architectures, it errors with:
sys-uuid.cc:96:12: error: 'strlen' was not declared in this scope
     assert(strlen(s) == 36U);
            ^~~~~~
sys-uuid.cc:96:12: note: 'strlen' is defined in header '<cstring>'; did you
forget to '#include <cstring>'?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

Piotr Kubaj <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #205301|                            |maintainer-approval?(samy.m
              Flags|                            |[hidden email])

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #1 from Samy Mahmoudi <[hidden email]> ---
(In reply to Piotr Kubaj from comment #0)

Hi,

Thank you for your report and your patch.

I think we will add an option to build with GCC (using compiler:gcc-c++11-lib)
as USE_GCC={6|7|8} is not sufficient to build properly with XMP=on (the linker
fails).

I will work on it as soon as possible.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #2 from Piotr Kubaj <[hidden email]> ---
(In reply to Samy Mahmoudi from comment #1)
Anything about this issue?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #3 from Samy Mahmoudi <[hidden email]> ---
(In reply to Piotr Kubaj from comment #2)
Yes, I just wrote a second patch. poudriere is now building for a port test.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

Samy Mahmoudi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #205961|text/x-diff                 |text/plain
          mime type|                            |
 Attachment #205961|0                           |1
           is patch|                            |

--- Comment #4 from Samy Mahmoudi <[hidden email]> ---
Created attachment 205961
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=205961&action=edit
Patch file generated with svn diff

- Add an option to build with GCC instead of Clang
- Correct DOCS into DOCS_DESC for a better description

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #5 from Samy Mahmoudi <[hidden email]> ---
Created attachment 205962
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=205962&action=edit
Poudriere log - Clang

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #6 from Samy Mahmoudi <[hidden email]> ---
Created attachment 205963
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=205963&action=edit
Poudriere log - GCC

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #7 from Samy Mahmoudi <[hidden email]> ---
N.B. With USES=compiler:gcc-c++11-lib, patching sys-uuid.cc was not necessary.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

Samy Mahmoudi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |239366


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239366
[Bug 239366] converters/pdf2djvu: update to version 0.9.13
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #8 from Piotr Kubaj <[hidden email]> ---
Your patch is wrong because users will need to enable GCC_BUILD option
manually. The package won't be built on a package builder.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #9 from Samy Mahmoudi <[hidden email]> ---
(In reply to Piotr Kubaj from comment #8)
> users will need to enable GCC_BUILD option manually.
That was indeed the intention.

> The package won't be built on a package builder.
I did not take package builders into account, wrongly. I will look for a better
solution using the ARCH variable.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #10 from Piotr Kubaj <[hidden email]> ---
(In reply to Samy Mahmoudi from comment #9)
You could just add to the default USES=compiler:c11.

This will use ports GCC on GCC architectures and base Clang elsewhere.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #11 from Samy Mahmoudi <[hidden email]> ---
(In reply to Piotr Kubaj from comment #10)
Hi,
This would have been simpler than using the ARCH variable. Unfortunately, with
compiler:c11 (and your initial patch) the linker fails again when XMP=on.

Here is what I will probably write:

-----------------------------------
...

.include <bsd.port.pre.mk>

.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
USES+=          compiler:gcc-c++11-lib
.else
USES+=          compiler:c++11-lang
.endif

...

.include <bsd.port.post.mk>
-----------------------------------

Is your GCC-architecture included in the previous conditionals ?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #12 from Samy Mahmoudi <[hidden email]> ---
Auxiliary problem: first, I went for something like:
If on GCC-architecture, then use gcc.
Else, default to clang with gcc as an option.
These considerations led me to:
-----------------------------------

GCC_BUILD_DESC=         Build with GCC (useless on GCC-architectures)

...

.include <bsd.port.pre.mk>

.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
USES+=          compiler:gcc-c++11-lib
.else
.if ${PORT_OPTIONS:MGCC_BUILD}
USES+=          compiler:gcc-c++11-lib
.else
USES+=          compiler:c++11-lang
.endif
.endif

...

.include <bsd.port.post.mk>
----------------------------------
It seemed that the inner conditional was not taken into account.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #13 from Samy Mahmoudi <[hidden email]> ---
While investigating, it seemed even the following didn't work as expected (the
following is just a test, would use an option helper in a real case):
--------------------------
.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MGCC_BUILD}
USES+=          compiler:gcc-c++11-lib
.else
USES+=          compiler:c++11-lang
.endif

.include <bsd.port.post.mk>
---------------------------

By trial and error, I found that to manually test for an option, I should
resort to:
------------------------------
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGCC_BUILD}
USES+=          compiler:gcc-c++11-lib
.else
USES+=          compiler:c++11-lang
.endif

.include <bsd.port.mk>
----------------------
This would prevent me from testing for ARCH.

emulators/wine-devel is an example of a port using pre/post *.mk to test for
ARCH and manually testing for STAGING on PORT_OPTIONS. Why can't I do the same
?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

Samy Mahmoudi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #205961|0                           |1
        is obsolete|                            |

--- Comment #14 from Samy Mahmoudi <[hidden email]> ---
Created attachment 206409
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=206409&action=edit
Patch file generated with svn diff

- Use GCC on GCC-architectures
- Correct DOCS into DOCS_DESC for a better description

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #15 from Samy Mahmoudi <[hidden email]> ---
(In reply to Samy Mahmoudi from comment #14)
Auxiliary problem still holds (comment 12 and comment 13).

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #16 from Piotr Kubaj <[hidden email]> ---
(In reply to Samy Mahmoudi from comment #14)
This assumes that powerpc* uses GCC which won't hold true forever. In fact,
powerpc* on head soon switches to clang.

Why not set USES=compiler:c++11-lang?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 238780] converters/pdf2djvu: fix build with GCC-based architectures

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238780

--- Comment #17 from Samy Mahmoudi <[hidden email]> ---
(In reply to Samy Mahmoudi from comment #11)
> .if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
> Is your GCC-architecture included in the previous conditionals ?
Based on comment 16, I assume it is.


(In reply to Piotr Kubaj from comment #16)
> In fact, powerpc* on head soon switches to clang.
Thanks for this information, I did not know that would happen soon, but...


(In reply to Piotr Kubaj from comment #16)
> This assumes that powerpc* uses GCC which won't hold true forever.
...the conditional expression was not meant to be immutable, e.g. to add new
GCC-architectures when needed, or to remove the ones clang become functional
on. Software sometimes needs to be maintained, even with the best software
methodologies and practices.

> Why not set USES=compiler:c++11-lang?
This was the default under which you had to file a bug report, so this would
only bring us back to Description (comment 0) and subsequent comments. Do you
mean USES=compiler:c++11-lib ? I am reading Mk/Uses/compiler.mk and will give
it a try. If this automatically chooses between clang and gcc depending on
architecture, it would avoid us to have to maintain the conditional. This would
definitely be a better practice !

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
12