Bug 179236

Summary: Build failure (lib-depends) for net/tigervnc when HPJPG is enabled
Product: Ports & Packages Reporter: Kevin Zheng <kevinz5000>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Not Accepted    
Severity: Affects Only Me CC: marino
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 180159    
Bug Blocks:    
Attachments:
Description Flags
file.txt
none
patch-tigervnc.diff
none
tigervnc-hpjpg_patch.txt none

Description Kevin Zheng 2013-06-02 23:30:01 UTC
net/tigervnc refuses to install itself when it is built with the HPJPG option. This is because libjpeg-turbo-1.3.0 conflicts with jpeg-8_4 on bin/cjpeg.

A full poudriere bulk build log is attached below.

Fix: Mark HPJPG broken until a solution is found.

Patch attached with submission follows:
How-To-Repeat: Build tigervnc with the HPJPG option enabled.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-06-02 23:30:16 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-06-02 23:30:16 UTC
Maintainer of net/tigervnc,

Please note that PR ports/179236 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/179236

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Koichiro IWAO 2013-06-03 03:58:14 UTC
You have to switch to graphics/libjpeg-turbo from graphics/jpeg first.
  # portmaster -o graphics/libjpeg-turbo graphics/jpeg

-- 
`whois vmeta.jp | nkf -w`
meta <meta@vmeta.jp>
Comment 4 Kevin Zheng 2013-06-05 04:03:48 UTC
On 06/02/13 21:58, Koichiro IWAO wrote:
> You have to switch to graphics/libjpeg-turbo from graphics/jpeg first.
>  # portmaster -o graphics/libjpeg-turbo graphics/jpeg
> 

Hi Koichiro,

Sorry for the delayed response.

While that certainly solves the problem, the bigger issue was that the
build was done in a poudriere clean-room environment. Basically, this
means that the HPJPG option requires manual user intervention and should
be marked as such in the ports build system.

I suggest that the HPJPG option be marked with NO_PACKAGE_BUILD. If this
idea is alright, I'll send a patch along, unless somebody commits this
first (it's probably a one-liner).

Thanks,
Kevin Zheng
Comment 5 Koichiro IWAO 2013-06-05 15:58:26 UTC
2013-06-05 12:03 Kevin Zheng wrote:
> I suggest that the HPJPG option be marked with NO_PACKAGE_BUILD. If 
> this
> idea is alright, I'll send a patch along, unless somebody commits this
> first (it's probably a one-liner).

Okay, I see the problem and agree your suggestion. Please send your 
patch.

-- 
`whois vmeta.jp | nkf -w`
meta <meta@vmeta.jp>
Comment 6 Kevin Zheng 2013-06-11 03:16:53 UTC
On 06/05/13 09:58, Koichiro IWAO wrote:
> 2013-06-05 12:03 Kevin Zheng wrote:
>> I suggest that the HPJPG option be marked with NO_PACKAGE_BUILD. If this
>> idea is alright, I'll send a patch along, unless somebody commits this
>> first (it's probably a one-liner).
> 
> Okay, I see the problem and agree your suggestion. Please send your patch.

Sorry for the long wait; this really shouldn't have taken this long.
Feel free to tweak the IGNORE message so that confused users know what
to do after it doesn't build.

Thanks,
Kevin Zheng
Comment 7 Koichiro Iwao freebsd_committer freebsd_triage 2013-06-13 20:52:31 UTC
Kevin, thanks for your patch. I added instructions how to
replace jpeg libraries.

Steve, would you please review my patch and commit it?
  - Mark IGNORE under PACKAGE_BUILDING with HPJPG option because
    the options requires manual user intervention
  - Add instructions how to replace jpeg with libjpeg-turbo
    when HPJPG option is enabled

-- 
`whois vmeta.jp | nkf -w`
meta <meta@vmeta.jp>
Comment 8 Scot Hetzel 2013-07-01 08:08:07 UTC
On Sun, Jun 30, 2013 at 10:06 PM, Koichiro IWAO <meta+ports@vmeta.jp> wrote:
> Would anyone mind taking ports/179236?
>
> ports/179236: Build failure (lib-depends) for net/tigervnc when HPJPG is
> enabled
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/179236
>
That fix is only covering up the problem.  You still won't be able to
make a package of tigervnc with libjpeg-turbo (HPJPG) as a dependency
on poudriere.

The correct fix would be to find all ports that are installing
graphics/jpeg and add an option to them to build with
graphics/libjpeg-turbo instead.  This way poudriere would then be able
to create packages linked to the appropriate port (graphics/jpeg or
libjpeg-turbo).

I looked at the build log, and it looks like the jasper package is the
one that is installing graphics/jpeg.  To fix graphics/jasper, remove
the LIB_DEPENDS line for graphics/jpeg from the Makefile.  Add HPJPG
to OPTIONS_DEFINE, along with the description:

HPJPG_DESC=             Build with High-Performance JPEG support

Then below the '.include <bsd.port.options.mk>' line add the following:

.if ${PORT_OPTIONS:MHPJPG}
LIB_DEPENDS+=   turbojpeg:${PORTSDIR}/graphics/libjpeg-turbo
.else
LIB_DEPENDS+=   jpeg:${PORTSDIR}/graphics/jpeg
.endif

This should fix the jasper port.  Then try a poudriere run to see if
jasper will build with the HPJPG option enabled.

Note: you might find other ports/packages that have a dependency on
graphics/jpeg that will need a similar fix.

-- 
DISCLAIMER:

No electrons were maimed while sending this message. Only slightly bruised.
Comment 9 Koichiro IWAO 2013-07-01 10:57:57 UTC
2013-07-01 16:08 ã« Scot Hetzel ããã¯æ¸ãã¾ãã:
> The correct fix would be to find all ports that are installing
> graphics/jpeg and add an option to them to build with
> graphics/libjpeg-turbo instead.  This way poudriere would then be able
> to create packages linked to the appropriate port (graphics/jpeg or
> libjpeg-turbo).
> 
> I looked at the build log, and it looks like the jasper package is the
> one that is installing graphics/jpeg.  To fix graphics/jasper, remove
> the LIB_DEPENDS line for graphics/jpeg from the Makefile.  Add HPJPG
> to OPTIONS_DEFINE, along with the description:
> 
> HPJPG_DESC=             Build with High-Performance JPEG support
> 
> Then below the '.include <bsd.port.options.mk>' line add the following:
> 
> .if ${PORT_OPTIONS:MHPJPG}
> LIB_DEPENDS+=   turbojpeg:${PORTSDIR}/graphics/libjpeg-turbo
> .else
> LIB_DEPENDS+=   jpeg:${PORTSDIR}/graphics/jpeg
> .endif

Would you mind sending the patch on graphics/jasper?
I do just maintain my tigervnc port.

-- 
`whois vmeta.jp | nkf -w`
meta <meta@vmeta.jp>
Comment 10 Scot Hetzel 2013-07-01 19:41:07 UTC
On Mon, Jul 1, 2013 at 4:57 AM, Koichiro IWAO <meta@vmeta.jp> wrote:
> 2013-07-01 16:08 $B$K(B Scot Hetzel $B$5$s$O=q$-$^$7$?(B:
>
>> The correct fix would be to find all ports that are installing
>> graphics/jpeg and add an option to them to build with
>> graphics/libjpeg-turbo instead.  This way poudriere would then be able
>> to create packages linked to the appropriate port (graphics/jpeg or
>> libjpeg-turbo).
>>
>> I looked at the build log, and it looks like the jasper package is the
>> one that is installing graphics/jpeg.  To fix graphics/jasper, remove
>> the LIB_DEPENDS line for graphics/jpeg from the Makefile.  Add HPJPG
>> to OPTIONS_DEFINE, along with the description:
>>
>> HPJPG_DESC=             Build with High-Performance JPEG support
>>
>> Then below the '.include <bsd.port.options.mk>' line add the following:
>>
>> .if ${PORT_OPTIONS:MHPJPG}
>> LIB_DEPENDS+=   turbojpeg:${PORTSDIR}/graphics/libjpeg-turbo
>> .else
>> LIB_DEPENDS+=   jpeg:${PORTSDIR}/graphics/jpeg
>> .endif
>
>
> Would you mind sending the patch on graphics/jasper?
> I do just maintain my tigervnc port.
>

Sent the patch for graphics/jasper

graphics/jasper: http://www.freebsd.org/cgi/query-pr.cgi?pr=180175

it depends on the changes to add a new USES jpeg feature:

Mk/Uses/jpeg.mk: http://www.freebsd.org/cgi/query-pr.cgi?pr=180159

-- 
DISCLAIMER:

No electrons were maimed while sending this message. Only slightly bruised.
Comment 11 John Marino freebsd_committer freebsd_triage 2014-06-19 10:37:10 UTC
The PR on jasper was rejected, so this one fails too.