[YLUG] Problem with compilation

Konstantinos Mokos mokosko at otenet.gr
Wed Dec 5 23:18:21 GMT 2007


*Hi everyone,

In need help in compiling a source code. I get these errors after make:*

zupiter at zupiter:~/arc-1.1$ <mailto:zupiter at zupiter:%7E/arc-1.1$> make
make  all-recursive
make[1]: Entering directory `/home/zupiter/arc-1.1'
Making all in src
make[2]: Entering directory `/home/zupiter/arc-1.1/src'
bison -y -v -d -p arc_shell_parser_ -b arc-shell-syntax \
           ./arc-shell-syntax.y
mv arc-shell-syntax.tab.c arc-shell-syntax.c
mv arc-shell-syntax.tab.h arc-shell-syntax.h
bison -y -v -d -p ar_lustre_ -b ar-lustre-syntax ./ar-lustre-syntax.y
mv ar-lustre-syntax.tab.c ar-lustre-syntax.c
mv ar-lustre-syntax.tab.h ar-lustre-syntax.h
make  all-am
make[3]: Entering directory `/home/zupiter/arc-1.1/src'
gcc -DHAVE_CONFIG_H -I. -I.. -I..  -INONE/include  -g -O2 -MT 
ar-backtracking-stack.o -MD -MP -MF .deps/ar-backtracking-stack.Tpo -c 
-o ar-backtracking-stack.o ar-backtracking-stack.c
In file included from ar-backtracking-stack.c:2:
/usr/include/ccl/ccl-memory.h:5:28: error: ccl-exception.h: No such file 
or directory
In file included from ar-backtracking-stack.c:2:
/usr/include/ccl/ccl-memory.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 
or ‘__attribute__’ before ‘void’
/usr/include/ccl/ccl-memory.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 
or ‘__attribute__’ before ‘void’
/usr/include/ccl/ccl-memory.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 
or ‘__attribute__’ before ‘void’
/usr/include/ccl/ccl-memory.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 
or ‘__attribute__’ before ‘void’
In file included from ar-backtracking-stack.c:3:
/usr/include/ccl/ccl-assert.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 
or ‘__attribute__’ before ‘void’
ar-backtracking-stack.c: In function ‘ar_backtracking_stack_create’:
ar-backtracking-stack.c:32: error: ‘NULL’ undeclared (first use in this 
function)
ar-backtracking-stack.c:32: error: (Each undeclared identifier is 
reported only once
ar-backtracking-stack.c:32: error: for each function it appears in.)
ar-backtracking-stack.c: In function ‘ar_backtracking_stack_add_reference’:
ar-backtracking-stack.c:43: error: ‘NULL’ undeclared (first use in this 
function)
ar-backtracking-stack.c: In function ‘ar_backtracking_stack_del_reference’:
ar-backtracking-stack.c:55: error: ‘NULL’ undeclared (first use in this 
function)
ar-backtracking-stack.c: In function ‘s_new_cell’:
ar-backtracking-stack.c:67: error: ‘NULL’ undeclared (first use in this 
function)
ar-backtracking-stack.c: In function ‘ar_backtracking_stack_restore’:
ar-backtracking-stack.c:103: error: ‘NULL’ undeclared (first use in this 
function)
ar-backtracking-stack.c: In function ‘ar_backtracking_stack_restore_last’:
ar-backtracking-stack.c:124: error: ‘NULL’ undeclared (first use in this 
function)
ar-backtracking-stack.c: In function ‘ar_backtracking_stack_is_empty’:
ar-backtracking-stack.c:158: error: ‘NULL’ undeclared (first use in this 
function)
ar-backtracking-stack.c: In function ‘s_backtracking_stack_destroy’:
ar-backtracking-stack.c:170: error: ‘NULL’ undeclared (first use in this 
function)
make[3]: *** [ar-backtracking-stack.o] Error 1
make[3]: Leaving directory `/home/zupiter/arc-1.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/zupiter/arc-1.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zupiter/arc-1.1'
make: *** [all] Error 2

*and i guess the problem comes from the ccl-memory.h file that i have 
included.

./configure gives me:*

zupiter at zupiter:~/arc-1.1$ <mailto:zupiter at zupiter:%7E/arc-1.1$> ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for doxygen... doxygen
checking for dot... dot
checking for ccl_init in -lccl... yes
checking for altarica_read_file in -larsyntax... yes
checking for a readline compatible library... -lreadline
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking whether readline supports history... yes
checking history.h usability... no
checking history.h presence... no
checking for history.h... no
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

* thnx in advance *

* Konstantinos Mokos
*

*
*
-------------- next part --------------
/* $Id: ccl-memory.h,v 1.2 2006/03/15 16:02:39 point Exp $ */
#ifndef __CCL_MEMORY_H__
# define __CCL_MEMORY_H__

# include <ccl-exception.h>

CCL_DECLARE_EXCEPTION(memory_exhausted_exception,runtime_exception);

			/* --------------- */

CCL_EXTERN void *
ccl_malloc(size_t size);

CCL_EXTERN void
ccl_free(void *ptr);

CCL_EXTERN void *
ccl_realloc(void *ptr, size_t size);

CCL_EXTERN void *
ccl_calloc(size_t nb_el, size_t el_size);


			/* --------------- */

# define ccl_new_array(_type_,_sz_) ((_type_ *)ccl_calloc(sizeof(_type_),_sz_))
# define ccl_new(_type_) ccl_new_array(_type_,1)
# define ccl_delete(_ptr_) ccl_free(_ptr_)
# define ccl_zdelete(_del,_ptr_) \
  do { if( (_ptr_) != NULL ) _del(_ptr_); } while(0)

# define ccl_memzero(_p,_size) memset(_p,0,_size)
# define ccl_memcpy(_dst,_src,_size) memcpy(_dst,_src,_size)
# define ccl_memcmp(_p1,_p2,_size) memcmp(_p1,_p2,_size)

#endif /* __CCL_MEMORY_H__ */


More information about the York mailing list