Solved ClamFS port

Greetings all,

I'm making a ClamFS port to FreeBSD these days and I encountered an error during compilation.
At first I downloaded the latest ClamFS version from here. Running ./configure completed successfully. But after I executed make the following error came up:

Code:
make all-recursive
Making all in src
c++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=25 -DRLOG_COMPONENT=clamfs -D_THREAD_SAFE -D_GNU_SOURCE -I/usr/local/include -I/usr/local/include -Wall -O2 -DNDEBUG -g -O2 -MT clamfs.o -MD -MP -MF .deps/clamfs.Tpo -c -o clamfs.o clamfs.cxx
In file included from clamfs.cxx:53:
In file included from ./clamfs.hxx:38:
In file included from ./rlog.hxx:44:
./config.hxx:52:17: error: expected namespace name
using namespace tr1;
^
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/mag/clamfs-1.0.1/src
*** Error code 1

Stop.
make[1]: stopped in /usr/home/mag/clamfs-1.0.1
*** Error code 1

Stop.
make: stopped in /usr/home/mag/clamfs-1.0.1

where is the problem with tr1 namespace ?

My system:

uname -a:
Code:
FreeBSD mag 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 22:51:51 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386

I have downloaded the latest base/head in /usr/src and have updated ports tree.
Any help is appreciated. Thanks!
 
Last edited by a moderator:
tr1 is the namespace where proposed additions to the C++ standard library where added. They are now in std.

I've tried compiling clamfs and got the same error, I then simply removed the offending line in src/config.hxx and voila it compiles without error.
 
Did exactly the same and another error comes up:

Code:
make all-recursive
Making all in src
c++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=25 -DRLOG_COMPONENT=clamfs -D_THREAD_SAFE -D_GNU_SOURCE -I/usr/local/include -I/usr/local/include -Wall -O2 -DNDEBUG -g -O2 -MT scancache.o -MD -MP -MF .deps/scancache.Tpo -c -o scancache.o scancache.cxx
In file included from scancache.cxx:27:
./scancache.hxx:71:40: error: use of undeclared identifier 'ino_t'
class ScanCache: public ExpireLRUCache<ino_t, CachedResult> {
^
./scancache.hxx:71:61: error: expected class name
class ScanCache: public ExpireLRUCache<ino_t, CachedResult> {
^
scancache.cxx:40:20: error: use of undeclared identifier 'ino_t'
ExpireLRUCache<ino_t, CachedResult>::ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
^
scancache.cxx:40:40: error: expected class member or base class name
ExpireLRUCache<ino_t, CachedResult>::ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
^
scancache.cxx:40:40: error: missing ',' between base or member initializers
ExpireLRUCache<ino_t, CachedResult>::ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
^
,
scancache.cxx:40:40: error: no template named 'ExpireLRUCache' in the global namespace; did you mean simply 'ExpireLRUCache'?
ExpireLRUCache<ino_t, CachedResult>::ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
^~~~~~~~~~~~~~~~
ExpireLRUCache
/usr/local/include/Poco/ExpireLRUCache.h:58:7: note: 'ExpireLRUCache' declared here
class ExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex>
^
scancache.cxx:40:57: error: use of undeclared identifier 'ino_t'
ExpireLRUCache<ino_t, CachedResult>::ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
^
scancache.cxx:40:77: error: expected class member or base class name
ExpireLRUCache<ino_t, CachedResult>::ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
^
scancache.cxx:40:77: error: expected '{' or ','
9 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/mag/clamfs-1.0.1/src
*** Error code 1

Stop.
make[1]: stopped in /usr/home/mag/clamfs-1.0.1
*** Error code 1

Stop.
make: stopped in /usr/home/mag/clamfs-1.0.1
 
Sorry about that. I forgot that I updated to 10-STABLE. It just works there. I tried this again in a 10.1 jail and you can fix your error by adding #include <sys/types.h> after #include "config.h" in src/scancache.hxx.
 
  • Thanks
Reactions: mag
Back
Top