Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2005 17:13:01 -0500
From:      "Juan F. A. Saldarriaga" <neb@gigax.org>
To:        Pav Lucistnik <pav@FreeBSD.org>
Cc:        freebsd-ports-bugs@FreeBSD.org, pav@FreeBSD.org
Subject:   Re: ports/80219: lang/chicken: Chicken $(includedir) its not on the BASE_CPPFLAGS
Message-ID:  <20050527171301.42840bdd.neb@gigax.org>
In-Reply-To: <200505262140.j4QLeGwl068357@freefall.freebsd.org>
References:  <200505262140.j4QLeGwl068357@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 26 May 2005 21:40:16 GMT
Pav Lucistnik <pav@FreeBSD.org> wrote:

> Synopsis: lang/chicken: Chicken $(includedir) its not on the BASE_CPPFLAGS
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: pav
> State-Changed-When: Thu May 26 21:39:49 GMT 2005
> State-Changed-Why: 
> Can you provide a patch for chicken port? I don't completely follow your
> explanation in the PR.
> 

Well, look, this is the cflags path when you compile the chicken port:

nebiros@Yggdrasil$ >> chicken-config -cflags
-O -pipe -march=pentiumpro -DC_STACK_GROWS_DOWNWARD=1 -DC_INSTALL_LIB_HOME=/usr/local/lib/chicken -DC_INSTALL_HOME=/usr/local/share/chicken -DC_USE_C_DEFAULTS

Now look what happend when you try to compile some stuff (in this case svnwiki http://cgi.afc.no-ip.info/svnwiki.cgi/default/svnwiki):

nebiros@Yggdrasil$ >> gmake 
chicken -hygienic svnwiki.scm
compiling `svnwiki.scm' ...
generating `svnwiki.c' ...
cc `chicken-config -cflags`   -c -o svnwiki.o svnwiki.c
svnwiki.c:11:21: chicken.h: No such file or directory
...

Cant find chicken.h because its not on the cflags path, chicken.h its located on /usr/local/include

Now this is the fix. We need to add -I$(includedir) to the BASE_CPPFLAGS variable in the Makefile file on the chicken sources. This is the patch:

--- Makefile.origin     Fri May 27 16:27:38 2005
+++ Makefile    Fri May 27 16:28:27 2005
@@ -199,7 +199,7 @@
 # use -DC_NO_PIC_NO_DLL ... -DC_NO_PIC_NO_DLL is only for libtool
 # compiles
 BASE_CPPFLAGS = -DC_STACK_GROWS_DOWNWARD=$(STACK_GROWS_DOWNWARD) -DC_INSTALL_LIB_HOME='"$(pkglibdir)"' \
-  -DC_INSTALL_HOME='"$(pkgdatadir)"' -DC_USE_C_DEFAULTS
+  -DC_INSTALL_HOME='"$(pkgdatadir)"' -DC_USE_C_DEFAULTS -I$(includedir)

 INCLUDES = $(BASE_CPPFLAGS) -DC_NO_PIC_NO_DLL

$includedir is:

includedir = ${prefix}/include

With this we fix the cflags problem.

This is the new cflags:

nebiros@Yggdrasil$ >> chicken-config -cflags
-O -pipe -march=pentiumpro -DC_STACK_GROWS_DOWNWARD=1 -DC_INSTALL_LIB_HOME=/usr/local/lib/chicken -DC_INSTALL_HOME=/usr/local/share/chicken -DC_USE_C_DEFAULTS -I/usr/local/include

And now it will find chicken.h, thats all :)

Sorry about my english.

> 
> Responsible-Changed-From-To: freebsd-ports-bugs->pav
> Responsible-Changed-By: pav
> Responsible-Changed-When: Thu May 26 21:39:49 GMT 2005
> Responsible-Changed-Why: 
> Track
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=80219
> 
> 


-- 

// eb ot ton ro eb ot
// _noitseuq hcus on s'ereht
// _tahw eb ot tub _eb ot
// 
// esuoh rethguals eht ot nekat s'taht peehs delliw-kaew a
// flow duorp a ro
// _modeerf htiw dellif si traeh esohw



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050527171301.42840bdd.neb>