Bug 93289 - Maintainer update: www/resin2 and www/resin3: honour PTHREAD_LIBS to fix build failure on FreeBSD 7
Summary: Maintainer update: www/resin2 and www/resin3: honour PTHREAD_LIBS to fix buil...
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: Sam Lawrance
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-13 14:50 UTC by Jean-Baptiste Quenot
Modified: 2006-04-04 17:25 UTC (History)
0 users

See Also:


Attachments
file.diff (2.68 KB, patch)
2006-02-13 14:50 UTC, Jean-Baptiste Quenot
no flags Details | Diff
patch-resin2 (3.02 KB, text/plain; charset=us-ascii)
2006-04-04 14:33 UTC, Jean-Baptiste Quenot
no flags Details
patch-resin3 (1.56 KB, text/plain; charset=iso-8859-1)
2006-04-04 14:33 UTC, Jean-Baptiste Quenot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Quenot 2006-02-13 14:50:07 UTC
This is an attempt to fix the following errors:

ports-i386@FreeBSD.org: resin-2.1.17 failed on i386 7
ports-i386@FreeBSD.org: resin-3.0.17 failed on i386 7

cc -rpath=/usr/lib:/usr/local/lib -L/usr/lib -lcrypto -lssl -o resin resin.o ../common/common.o std.o memory.o ssl.o -lc_r
/usr/bin/ld: cannot find -lc_r
*** Error code 1

A new patch is added to remove hardcoded reference to -lc_r.  The CFLAGS
variable is augmented with PTHREAD_LIBS.
Comment 1 Sam Lawrance freebsd_committer freebsd_triage 2006-02-14 08:54:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lawrance

Grab
Comment 2 Sam Lawrance freebsd_committer freebsd_triage 2006-03-16 12:14:26 UTC
State Changed
From-To: open->feedback

I would suggest doing something like: 

post-patch: 
${REINPLACE_CMD} 's,-lc_r,${PTHREAD_LIBS}' ${WRKSRC}/configure 

How does that sound?  As Kris mentioned, it prevents ${PTHREAD_LIBS} being 
added to any and every invocation of cc.
Comment 3 Jean-Baptiste Quenot 2006-03-16 15:20:08 UTC
* Sam Lawrance:
> Synopsis: Maintainer update: www/resin2 and www/resin3: honour PTHREAD_LIBS to fix build failure on FreeBSD 7
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: lawrance
> State-Changed-When: Thu Mar 16 12:14:26 UTC 2006
> State-Changed-Why: 
> I would suggest doing something like:
> 
> post-patch:
> 	${REINPLACE_CMD} 's,-lc_r,${PTHREAD_LIBS}' ${WRKSRC}/configure
> 
> How does that sound?  As Kris mentioned, it prevents ${PTHREAD_LIBS} being
> added to any and every invocation of cc.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=93289

That sounds bad:

/usr/bin/ld -shared -o libresin.so jni_vfs.o std.o memory.o ssl.o -pthread
/usr/bin/ld: unrecognized option '-pthread'
/usr/bin/ld: use the --help option for usage information

PTHREAD_LIBS is not linker flags, in despite of its name.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/
Comment 4 Jean-Baptiste Quenot 2006-04-04 14:33:30 UTC
Please  find  attached an  updated  patch  for www/resin2,  and  a
ultimate fix for www/resin3 to allow OpenSSL.

Thanks for your help!
-- 
     Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/
Comment 5 Sam Lawrance freebsd_committer freebsd_triage 2006-04-04 17:25:35 UTC
State Changed
From-To: feedback->closed

Committed, thanks!