zakkymuha / lusca-cache

Automatically exported from code.google.com/p/lusca-cache
0 stars 0 forks source link

Openbsd Compile Issue? #112

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Does lusca doesn't support openbsd?i've got error when compile,with this
following error :
---------------------------------------------------------------------------
mv -f .deps/mainloop.Tpo .deps/mainloop.Po
gcc -DHAVE_CONFIG_H -I. -I../include      -D_FILE_OFFSET_BITS=64 -Wall -g
-O2 -D_REENTRANT -MT comm_ips_null.o -MD -MP -MF .deps/comm_ips_null.Tpo -c
-o comm_ips_null.o comm_ips_null.c
mv -f .deps/comm_ips_null.Tpo .deps/comm_ips_null.Po
gcc -DHAVE_CONFIG_H -I. -I../include      -D_FILE_OFFSET_BITS=64 -Wall -g
-O2 -D_REENTRANT -MT comm_ips_tproxy2.o -MD -MP -MF
.deps/comm_ips_tproxy2.Tpo -c -o comm_ips_tproxy2.o comm_ips_tproxy2.c
mv -f .deps/comm_ips_tproxy2.Tpo .deps/comm_ips_tproxy2.Po
gcc -DHAVE_CONFIG_H -I. -I../include      -D_FILE_OFFSET_BITS=64 -Wall -g
-O2 -D_REENTRANT -MT comm_ips_tproxy4.o -MD -MP -MF
.deps/comm_ips_tproxy4.Tpo -c -o comm_ips_tproxy4.o comm_ips_tproxy4.c
mv -f .deps/comm_ips_tproxy4.Tpo .deps/comm_ips_tproxy4.Po
gcc -DHAVE_CONFIG_H -I. -I../include      -D_FILE_OFFSET_BITS=64 -Wall -g
-O2 -D_REENTRANT -MT comm_ips_freebsd.o -MD -MP -MF
.deps/comm_ips_freebsd.Tpo -c -o comm_ips_freebsd.o comm_ips_freebsd.c
mv -f .deps/comm_ips_freebsd.Tpo .deps/comm_ips_freebsd.Po
gcc -DHAVE_CONFIG_H -I. -I../include      -D_FILE_OFFSET_BITS=64 -Wall -g
-O2 -D_REENTRANT -MT comm_kqueue.o -MD -MP -MF .deps/comm_kqueue.Tpo -c -o
comm_kqueue.o comm_kqueue.c
comm_kqueue.c: In function `commSetEvents':
comm_kqueue.c:167: error: `uintptr_t' undeclared (first use in this function)
comm_kqueue.c:167: error: (Each undeclared identifier is reported only once
comm_kqueue.c:167: error: for each function it appears in.)
comm_kqueue.c:167: error: syntax error before "fd"
comm_kqueue.c:173: error: syntax error before "fd"
*** Error code 1

Stop in /usr/local/src/LUSCA_HEAD-r14635/libiapp (line 92 of
/usr/share/mk/sys.mk).
*** Error code 1

Stop in /usr/local/src/LUSCA_HEAD-r14635 (line 325 of Makefile).
---------------------------------------------------------------------------

with this following configure option :
./configure -prefix=/cache -enable-storeio=aufs,coss -enable-async-io=48
-with-aufs-threads=48 -with-pthreads -with-aio -with-dl
-enable-removal-policies=heap -enable-snmp -disable-wccp -disable-wccpv2
-enable-large-cache-files -with-large-files

any patch or workaround?

Thanks for this great daemon! :)

Original issue reported on code.google.com by unexplai...@gmail.com on 30 Apr 2010 at 10:26

GoogleCodeExporter commented 9 years ago
Try LUSCA_HEAD now? I've added a potentially missing #include <sys/types.h> to 
comm_kqueue.c .

I don't have an openbsd box handy to try compiling it on. :/

Original comment by adrian.c...@gmail.com on 6 Aug 2010 at 6:41

GoogleCodeExporter commented 9 years ago
I've added <inttypes.h> to comm_kqueue.c and compiling succeed to start again 
until found another error like below:

Making all in libsqftp
if gcc -DHAVE_CONFIG_H -I. -I. -I../include    -I/include  -Wall -g -O2 
-D_REENTRANT -MT ftp_util.o -MD -MP -MF ".deps/ftp_util.Tpo" -c -o ftp_util.o 
ftp_util.c;  then mv -f ".deps/ftp_util.Tpo" ".deps/ftp_util.Po"; else rm -f 
".deps/ftp_util.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I../include    -I/include  -Wall -g -O2 
-D_REENTRANT -MT ftp_parts.o -MD -MP -MF ".deps/ftp_parts.Tpo" -c -o 
ftp_parts.o ftp_parts.c;  then mv -f ".deps/ftp_parts.Tpo" 
".deps/ftp_parts.Po"; else rm -f ".deps/ftp_parts.Tpo"; exit 1; fi
In file included from ftp_parts.c:19:
../libcore/tools.h:33: error: expected declaration specifiers or '...' before 
'va_list'
*** Error 1 in libsqftp (Makefile:303 'ftp_parts.o')

Original comment by fer...@gmail.com on 23 Aug 2013 at 5:04

GoogleCodeExporter commented 9 years ago
using env CC=egcc bypass libsqftp error

I use OpenBSD-5.3 with it's gcc-4.6 ports
# egcc -v
Using built-in specs.
COLLECT_GCC=egcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-openbsd5.3/4.6.3/lto-w
rapper
Target: x86_64-unknown-openbsd5.3
Configured with: /usr/obj/gcc-4.6.3/gcc-4.6.3/configure --enable-libgcj 
--without-jar --verbose --program-transform-name='s,^,e,' --disable-nls 
--disable-checking --with-system-zlib --disable-libmudflap --disable-libgomp 
--disable-tls --with-as=/usr/bin/as --with-ld=/usr/bin/ld --with-gnu-ld 
--with-gnu-as --enable-threads=posix --enable-wchar_t --with-gmp=/usr/local 
--disable-libstdcxx-pch --enable-languages=c,c++,fortran,objc,java,ada,go 
--enable-cpp --enable-shared --prefix=/usr/local --sysconfdir=/etc 
--mandir=/usr/local/man --infodir=/usr/local/info --localstatedir=/var 
--disable-silent-rules
Thread model: posix
gcc version 4.6.3 (GCC)

and now facing another error like below :
Making all in fs
depbase=`echo aufs/store_dir_aufs.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;  if 
egcc -DHAVE_CONFIG_H -I. -I. -I../../include -I. -I../../include 
-I../../include  -I../../src   -I/usr/local/include  -Wall -g -O2 -D_REENTRANT 
-MT aufs/store_dir_aufs.o -MD -MP -MF "$depbase.Tpo" -c -o 
aufs/store_dir_aufs.o aufs/store_dir_aufs.c;  then mv -f "$depbase.Tpo" 
"$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
In file included from aufs/store_dir_aufs.c:38:0:
./../../libasyncio/aiops.h:55:5: error: unknown type name 'pthread_mutex_t'
./../../libasyncio/aiops.h:56:5: error: unknown type name 'pthread_cond_t'
./../../libasyncio/aiops.h:66:5: error: unknown type name 'pthread_t'
*** Error 1 in src/fs (Makefile:405 'aufs/store_dir_aufs.o')
*** Error 1 in src (Makefile:1010 'all-recursive')
*** Error 1 in src (Makefile:693 'all')

Original comment by fer...@gmail.com on 23 Aug 2013 at 5:54

GoogleCodeExporter commented 9 years ago
adding #include <pthread.h> at libasyncio/aiops.h fix above error
and finally we successfully complete the compile process

so to success compile on OpenBSD we have to :
1. add <inttypes.h> to comm_kqueue.c
2. add <pthread.h> to aiops.h
3. using gcc-4.6 or gcc-4.7 port (egcc)

Original comment by fer...@gmail.com on 23 Aug 2013 at 6:39