Bug 170429 - [PATCH] devel/gdb: Really depend on readline from ports
Summary: [PATCH] devel/gdb: Really depend on readline from ports
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-06 22:30 UTC by Yuri Pankov
Modified: 2012-08-09 17:50 UTC (History)
1 user (show)

See Also:


Attachments
gdb-7.4.1_4.patch (557 bytes, patch)
2012-08-06 22:30 UTC, Yuri Pankov
no flags Details | Diff
gdb.diff (621 bytes, patch)
2012-08-06 23:39 UTC, Yuri Pankov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Pankov 2012-08-06 22:30:02 UTC
Removing ABI version number from LIB_DEPENDS to pet portlint broke gdb build when readline from ports isn't installed before gdb build.

Port maintainer (luca.pizzamiglio@gmail.com) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: CVS)

How-To-Repeat: pkg_delete -x readline
try to build devel/gdb
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-06 22:30:24 UTC
Maintainer of devel/gdb,

Please note that PR ports/170429 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/170429

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-06 22:30:26 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Bryan Drewery freebsd_committer freebsd_triage 2012-08-06 23:14:02 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bdrewery

I'll take it.
Comment 4 Bryan Drewery freebsd_committer freebsd_triage 2012-08-06 23:14:19 UTC
Using versioned LIB_DEPENDS is discouraged. The problem could resurface
again if base has readline.6 as well.

This will ensure that the *package* called readline is installed, thus
ensuring the port version:

LIB_DEPENDS+= readline>0:${PORTSDIR}/devel/readline

-- 
Regards,
Bryan Drewery
bdrewery@freenode/EFNet
Comment 5 Yuri Pankov 2012-08-06 23:22:42 UTC
On Mon, 06 Aug 2012 17:14:19 -0500, Bryan Drewery wrote:
> Using versioned LIB_DEPENDS is discouraged. The problem could resurface
> again if base has readline.6 as well.
>
> This will ensure that the *package* called readline is installed, thus
> ensuring the port version:
>
> LIB_DEPENDS+= readline>0:${PORTSDIR}/devel/readline

phoenix:yuri:~/ports/devel/gdb$ grep LIB_DEPENDS Makefile
LIB_DEPENDS+=   readline>0:${PORTSDIR}/devel/readline
LIB_DEPENDS+=   expat:${PORTSDIR}/textproc/expat2
phoenix:yuri:~/ports/devel/gdb$ sudo make depends
Syntax error: redirection unexpected
*** [lib-depends] Error code 2

Stop in /home/yuri/ports/devel/gdb.
Comment 6 Bryan Drewery freebsd_committer freebsd_triage 2012-08-06 23:30:15 UTC
On 8/6/2012 5:22 PM, Yuri Pankov wrote:
> On Mon, 06 Aug 2012 17:14:19 -0500, Bryan Drewery wrote:
>> Using versioned LIB_DEPENDS is discouraged. The problem could resurface
>> again if base has readline.6 as well.
>>
>> This will ensure that the *package* called readline is installed, thus
>> ensuring the port version:
>>
>> LIB_DEPENDS+= readline>0:${PORTSDIR}/devel/readline
> 
> phoenix:yuri:~/ports/devel/gdb$ grep LIB_DEPENDS Makefile
> LIB_DEPENDS+=   readline>0:${PORTSDIR}/devel/readline
> LIB_DEPENDS+=   expat:${PORTSDIR}/textproc/expat2
> phoenix:yuri:~/ports/devel/gdb$ sudo make depends
> Syntax error: redirection unexpected
> *** [lib-depends] Error code 2
> 
> Stop in /home/yuri/ports/devel/gdb.

You can use BUILD_DEPENDS/RUN_DEPENDS then.
Comment 7 Yuri Pankov 2012-08-06 23:39:31 UTC
On Mon, 06 Aug 2012 17:30:15 -0500, Bryan Drewery wrote:
> On 8/6/2012 5:22 PM, Yuri Pankov wrote:
>> On Mon, 06 Aug 2012 17:14:19 -0500, Bryan Drewery wrote:
>>> Using versioned LIB_DEPENDS is discouraged. The problem could resurface
>>> again if base has readline.6 as well.
>>>
>>> This will ensure that the *package* called readline is installed, thus
>>> ensuring the port version:
>>>
>>> LIB_DEPENDS+= readline>0:${PORTSDIR}/devel/readline
>>
>> phoenix:yuri:~/ports/devel/gdb$ grep LIB_DEPENDS Makefile
>> LIB_DEPENDS+=   readline>0:${PORTSDIR}/devel/readline
>> LIB_DEPENDS+=   expat:${PORTSDIR}/textproc/expat2
>> phoenix:yuri:~/ports/devel/gdb$ sudo make depends
>> Syntax error: redirection unexpected
>> *** [lib-depends] Error code 2
>>
>> Stop in /home/yuri/ports/devel/gdb.
>
> You can use BUILD_DEPENDS/RUN_DEPENDS then.

Thanks, that did the trick.
Comment 8 luca.pizzamiglio 2012-08-07 14:03:28 UTC
Hi guys,
I would like to find a definitive solution about that and maybe the
last patch submitted could fix this problem.

libreadline provided by FreeBSD is not compatible anymore with gdb.
Originally I forced the dependency of readline using the line:
LIB_DEPENDS+=      readline.6:${PORTSDIR}/devel/readline

A commiter changed it to:
LIB_DEPENDS+=      readline:${PORTSDIR}/devel/readline

I tested this change on redports (using 7,8,9 and current FreeBSD
backend), that is a clean system, without packages installed, and
readline dependency is always correctly detected and solved.
Yuri has a problem to detect this dependency, but I don't understand why.

BTW, the behavior should be:
<< hey, ignore system libreadline, I want the port's one! >>

AFAIK, FreeBSD 8 has libreadline.so.8 and FreeBSD 7 has libreadline.so.7.
Ports readline installs libreadline.so.6, so

LIB_DEPENDS+=      readline.6:${PORTSDIR}/devel/readline

was the not 100% clean solution adopted.

This new syntax:
BUILD_DEPENDS+=    readline>0:${PORTSDIR}/devel/readline
RUN_DEPENDS+= readline>0:${PORTSDIR}/devel/readline

is not documented on the Porter's Handbook and I didn't know it, but
it does what I want, so it could be the 100% clean solution I was
looking for.
I'd wait redports build report to answer, but it's taking too much
time (loooong queue).
So I definitively approve this patch, thanks for that.
I guess that no portrevision bumping is required, people don't need to
recompile gdb if it's already work :)

Thanks again
Comment 9 Bryan Drewery freebsd_committer freebsd_triage 2012-08-08 15:41:32 UTC
State Changed
From-To: feedback->open

Maintainer feedback received.
Comment 10 Bryan Drewery freebsd_committer freebsd_triage 2012-08-09 17:47:35 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 11 dfilter service freebsd_committer freebsd_triage 2012-08-09 17:47:42 UTC
Author: bdrewery
Date: Thu Aug  9 16:47:32 2012
New Revision: 302345
URL: http://svn.freebsd.org/changeset/ports/302345

Log:
  - Restore readline.6 library dependency as the port only
    works with that shlib version.
  
  PR:		ports/170429
  Submitted by:	Yuri Pankov <yuri.pankov@gmail.com>
  Approved by:	Luca Pizzamiglio <luca.pizzamiglio@gmail.com (maintainer)
  Approved by:	eadler (mentor)

Modified:
  head/devel/gdb/Makefile

Modified: head/devel/gdb/Makefile
==============================================================================
--- head/devel/gdb/Makefile	Thu Aug  9 15:43:08 2012	(r302344)
+++ head/devel/gdb/Makefile	Thu Aug  9 16:47:32 2012	(r302345)
@@ -38,9 +38,9 @@ MAN1=	gdb${VER}.1
 
 ONLY_FOR_ARCHS=	i386 amd64	# untested elsewhere, might work
 
-# Forcing to use the readline from ports (readline in FreeBSD world is not
-# compatible anymore).
-LIB_DEPENDS+=	readline:${PORTSDIR}/devel/readline
+# Forcing to use readline.6 from ports (newer readline in FreeBSD world is not
+# compatible anymore). Please ignore portlint here.
+LIB_DEPENDS+=	readline.6:${PORTSDIR}/devel/readline
 CFLAGS+=	-isystem ${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"