[MacPorts] #28906: gforth 0.7.0 can't find libcc.h
MacPorts
noreply at macports.org
Sat Mar 26 02:03:56 PDT 2011
#28906: gforth 0.7.0 can't find libcc.h
---------------------------------------+------------------------------------
Reporter: vladimir.kupcov@… | Owner: arto.bendiken@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.9.2
Keywords: | Port: gforth
---------------------------------------+------------------------------------
Comment(by vladimir.kupcov@…):
In my example there was few functions from ncurses.h, but you can try to
call any C function. Here is what you need to type to call abs from
stdlib.h:
{{{
\c #include <stdlib.h>
c-function stdlib_abs abs n -- n
-3 stdlib_abs .
}}}
gforth should show "3 ok", but instead there will be error messages saying
"gforth/0.7.0/libcc.h: No such file or directory" and "libtool compile
failed". If you save this code to test.fs and run "gforth test.fs", you'll
get something like this:
{{{
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c:1:32: error:
gforth/0.7.0/libcc.h: No such file or directory
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c: In function
'gforth_c_1010588D0_LTX_gforth_c_abs_n_n':
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c:5: error: 'Cell'
undeclared (first use in this function)
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c:5: error: (Each
undeclared identifier is reported only once
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c:5: error: for
each function it appears in.)
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c:5: error:
expected ';' before 'MAYBE_UNUSED'
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c:6: error: 'Float'
undeclared (first use in this function)
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c:6: error:
expected ';' before 'MAYBE_UNUSED'
/Users/vladkupcov/.gforth/libcc-tmp/gforth_c_1010588D0.c:7: error: 'sp'
undeclared (first use in this function)
in file included from *OS command line*:-1
test.fs:3: libtool compile failed
-3 >>>stdlib_abs<<< .
Backtrace:
$101004990 throw
$101040500 c(abort")
$101040C70 compile-wrapper-function
}}}
And if you type
{{{
see compile-wrapper-function1
}}}
gforth will show you piece of Forth code with path to C include files for
libtool, just like in my first message. I think this path should be
"/opt/local/include".
Hopefully this will help.
Thank you,
Vlad Kupcov
--
Ticket URL: <https://trac.macports.org/ticket/28906#comment:3>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list