Bug 100830 - Compile devel/newt fails on FreeBSD 6.1
Summary: Compile devel/newt fails on FreeBSD 6.1
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: Hye-Shik Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-25 21:40 UTC by Matthias Fechner
Modified: 2006-10-09 13:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fechner freebsd_committer freebsd_triage 2006-07-25 21:40:13 UTC
	I have tried to upgrade /usr/ports/devel/newt from version newt-0.51.0_2 to newt-0.51.0_3. I will get the following error:
cc -O1 -pipe -march=pentiumpro -I/usr/local/include -I/usr/local/include -c test.c
cc -g  -L/usr/local/lib -L/usr/local/lib -o test test.o libnewt.a -lslang -lm -lpopt -lncurses -static
/usr/local/lib/libslang.a(sldisply.o)(.text+0x2bdc): In function `SLtt_tgetstr':
: undefined reference to `tgetstr'
/usr/local/lib/libslang.a(sldisply.o)(.text+0x2c3b): In function `SLtt_tgetnum':
: undefined reference to `tgetnum'
/usr/local/lib/libslang.a(sldisply.o)(.text+0x2c6b): In function `SLtt_tgetflag':
: undefined reference to `tgetflag'
/usr/local/lib/libslang.a(sldisply.o)(.text+0x2e83): In function `SLtt_initialize':
: undefined reference to `tgetent'
*** Error code 1

How-To-Repeat: 	Insert portupgrade newt or cd /usr/ports/devel/newt; make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-07-25 21:42:00 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perky

Over to maintainer
Comment 2 Matthias Fechner freebsd_committer freebsd_triage 2006-07-31 22:29:32 UTC
I found now a solution, devel/newt conflicts with ncurses-5.5_2.
I deinstalled ncurses-5.5_2 and now newt compiles fine.

Maybe anyone should insert ncurses as blocker or force newt to use the
libs from /usr/lib and not from /usr/local/lib.

Best regards,
Matthias
Comment 3 Thomas E. Dickey 2006-08-13 18:06:00 UTC
> I found now a solution, devel/newt conflicts with ncurses-5.5_2.
> I deinstalled ncurses-5.5_2 and now newt compiles fine.


> Maybe anyone should insert ncurses as blocker or force newt to use the
> libs from /usr/lib and not from /usr/local/lib.


Something's missing from the analysis - either ncurses library would
provide the termcap interface.  The newt port is missing a -L option to
ensure that the particular version of ncurses used is from /usr/lib.

Something like this might work:

	LIBS = -lslang -lm -lpopt -L/usr/lib -lncurses #-lefence
	SHLIBS = -lslang -lm -lc -lpopt -L/usr/lib -lncurses

note:  slang's apparently depending on ncurses since it doesn't know
about the cgetent() interface to the termcap database.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
Comment 4 Matthias Fechner freebsd_committer freebsd_triage 2006-08-16 14:31:55 UTC
Hi Thomas,

Thomas Dickey wrote:
> Something's missing from the analysis - either ncurses library would
> provide the termcap interface.  The newt port is missing a -L option to
> ensure that the particular version of ncurses used is from /usr/lib.
> 
> Something like this might work:
> 
> 	LIBS = -lslang -lm -lpopt -L/usr/lib -lncurses #-lefence
> 	SHLIBS = -lslang -lm -lc -lpopt -L/usr/lib -lncurses

the following patch solves the problem:
--- patch-ab.orig       Wed Aug 16 15:28:03 2006
+++ patch-ab    Wed Aug 16 15:28:26 2006
@@ -12,8 +12,8 @@
 -ifeq ($(RPM_OPT_FLAGS),)
 -CFLAGS += -g
 -endif
-+CFLAGS += -I${LOCALBASE}/include -I${PREFIX}/include
-+LDFLAGS += -L${LOCALBASE}/lib -L${PREFIX}/lib
++CFLAGS += -I/usr/include -I${LOCALBASE}/include -I${PREFIX}/include
++LDFLAGS += -L/usr/lib -L${LOCALBASE}/lib -L${PREFIX}/lib

  VERSION = @VERSION@
  CVSTAG = r$(subst .,-,$(VERSION))


Thx
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
Comment 5 Hye-Shik Chang freebsd_committer freebsd_triage 2006-10-09 13:01:11 UTC
State Changed
From-To: open->closed

The patch committed.  Thank you !
Comment 6 dfilter service freebsd_committer freebsd_triage 2006-10-09 13:03:01 UTC
perky       2006-10-09 12:02:48 UTC

  FreeBSD ports repository

  Modified files:
    devel/newt/files     patch-ab 
  Log:
  Fix build on environments with ncurses port.
  
  PR:             100830
  Submitted by:   Matthias Fechner <idefix@fechner.net>,
                  Thomas Dickey <dickey@his.com>
  
  Revision  Changes    Path
  1.7       +2 -2      ports/devel/newt/files/patch-ab
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"