From root@thud.office.tht.net  Sun Mar 16 14:01:54 2003
Return-Path: <root@thud.office.tht.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E34E737B405
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 16 Mar 2003 14:01:54 -0800 (PST)
Received: from thud.office.tht.net (thud.office.tht.net [216.126.95.62])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6BEB343F75
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 16 Mar 2003 14:01:54 -0800 (PST)
	(envelope-from root@thud.office.tht.net)
Received: by thud.office.tht.net (Postfix, from userid 0)
	id 98C2E562B; Sun, 16 Mar 2003 17:05:59 -0500 (EST)
Message-Id: <20030316220559.98C2E562B@thud.office.tht.net>
Date: Sun, 16 Mar 2003 17:05:59 -0500 (EST)
From: Greg Prosser <gregp@noc.tht.net>
Reply-To: Greg Prosser <gregp@noc.tht.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: lang/expect port fails to build; tclConfig.sh wrong 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         50058
>Category:       ports
>Synopsis:       lang/expect port fails to build; tclConfig.sh wrong
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dinoex
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 16 14:10:10 PST 2003
>Closed-Date:    Sat Apr 05 21:35:58 PST 2003
>Last-Modified:  Sat Apr 05 21:35:58 PST 2003
>Originator:     Greg Prosser
>Release:        FreeBSD 4.8-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD thud.office.tht.net 4.8-PRERELEASE FreeBSD 4.8-PRERELEASE #4: Thu Feb 20 19:48:22 EST 2003 gregp@thud.office.tht.net:/usr/obj/usr/src/sys/THUD i386


	
>Description:

When executing 'make WITHOUT_X11=YES' in /usr/ports/lang/expect, I receive this error:

[gregp@thud] /usr/ports/lang/expect# make
===>  Building for expect-5.38.0_1
rm -f libexpect538.so.1
ld -shared -x -o libexpect538.so.1 shared/exp_command.o shared/expect.o shared/pty_termios.o  shared/exp_inter.o shared/exp_regexp.o shared/exp_tty.o  shared/exp_log.o shared/exp_main_sub.o shared/exp_pty.o  shared/exp_trap.o  shared/exp_console.o shared/exp_strf.o shared/exp_glob.o  shared/exp_win.o shared/exp_clib.o  shared/exp_closetcl.o shared/exp_memmove.o shared/exp_tty_comm.o  shared/exp_select.o shared/exp_event.o  shared/exp_chan.o shared/Dbg.o -Wl,-rpath,/usr/local/lib -L/usr/local/lib -ltcl83   -lm -lutil -lc
/usr/libexec/elf/ld: unrecognized option '-Wl,-rpath,/usr/local/lib'
/usr/libexec/elf/ld: use the --help option for usage information
*** Error code 1

Stop in /usr/ports/lang/expect/work/expect-5.38.
*** Error code 1

Stop in /usr/ports/lang/expect.
[gregp@thud] /usr/ports/lang/expect# 

I am told this results because expect's build is trying to use ld with the flags it gets from tclConfig.sh, while TCL's build tree expects to pass those to gcc.  Those are gcc options, and not ld options, and hence the breakage.

	
>How-To-Repeat:

Try to install/build lang/expect port.

	
>Fix:

I have gotten expect to build, by editing the variable TCL_LD_SEARCH_FLAGS in /usr/local/lib/tcl8.3/tclConfig.sh as follows:

previous:
TCL_LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
corrected:
TCL_LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'

After doing so, the port builds without issue.
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->dinoex 
Responsible-Changed-By: arved 
Responsible-Changed-When: Sat Mar 29 08:55:43 PST 2003 
Responsible-Changed-Why:  
Possible problem with tcl83 port, Over to tcl83 Maintainer. 

Just FYI, I can reproduce this problem 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50058 
State-Changed-From-To: open->analyzed 
State-Changed-By: dinoex 
State-Changed-When: Sat Mar 29 09:59:47 PST 2003 
State-Changed-Why:  

Sorry true "LD" Flags are only supported in tcl84 not tcl83 

# grep SEARCH_FLAGS /usr/local/lib/tcl8.*/tclConfig.sh  
/usr/local/lib/tcl8.2/tclConfig.sh:TCL_LD_SEARCH_FLAGS='' 
/usr/local/lib/tcl8.3/tclConfig.sh:TCL_LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 
/usr/local/lib/tcl8.4/tclConfig.sh:TCL_CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 
/usr/local/lib/tcl8.4/tclConfig.sh:TCL_LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 

If you depend on the TCL_LD_SEARCH_FLAGS value,  
please update your port to use tcl84. 

I do not know if the authors will backport this change to tcl8.3 


http://www.freebsd.org/cgi/query-pr.cgi?pr=50058 
State-Changed-From-To: analyzed->closed 
State-Changed-By: dinoex 
State-Changed-When: Sat Apr 5 21:35:38 PST 2003 
State-Changed-Why:  
Fix has been committed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50058 
>Unformatted:
