hacker / iii

iii - Eye-Fi card manager daemon open source implementation
http://kin.klever.net/iii/
MIT License
36 stars 6 forks source link

Problems compiling #1

Closed C0de-M0nkey closed 3 years ago

C0de-M0nkey commented 11 years ago

Hi,

I'm sure its problem of my making. I'm trying to cross compile iii to run on a Thecus NAS device. Its been a challenge just to get the pre-reqs in place, but now I've hit this ...

make[2]: Entering directory /root/iii/src' i686-thecus32v5-linux-gnu-g++ -DHAVE_CONFIG_H -I.. -I. -I. -DWITH_DOM -I/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu/ModBase1.DEV32/include -I/raid/data/module/iii/sys/include -I/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu/ModBase1.DEV32/include -DNDEBUG -DEYEKIN_CONF_DIR=\"/raid/data/module/iii/sys/etc/iii\" -DWITH_PURE_VIRTUAL -D_FILE_OFFSET_BITS=64 -O2 -fno-inline -fPIC -I/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu/ModBase1.DEV32/include -D_FILE_OFFSET_BITS=64 -O2 -fno-inline -fPIC -I/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu/ModBase1.DEV32/include -I/root/libarchive/libarchive/ -D_FILE_OFFSET_BITS=64 -O2 -fno-inline -fPIC -I/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu/ModBase1.DEV32/include -D_FILE_OFFSET_BITS=64 -O2 -fno-inline -fPIC -I/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu/ModBase1.DEV32/include -I/root/libarchive/libarchive/ -MT eyekinfig.o -MD -MP -MF .deps/eyekinfig.Tpo -c -o eyekinfig.o eyekinfig.cc eyekinfig.cc: In constructor 'eyekinfig_t::eyekinfig_t(const std::string&)': eyekinfig.cc:11: error: expected primary-expression before '.' token eyekinfig.cc:12: error: expected primary-expression before '.' token eyekinfig.cc:13: error: expected primary-expression before '.' token eyekinfig.cc:14: error: expected primary-expression before '.' token eyekinfig.cc:15: error: expected primary-expression before '.' token eyekinfig.cc:16: error: expected primary-expression before '.' token make[2]: *** [eyekinfig.o] Error 1 make[2]: Leaving directory/root/iii/src' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/root/iii' make: * [all] Error 2

Do you have any hints on what may be wrong ? Sorry I'm not familiar enough with CPP to diagnose the issue myself.

Thanks

CM

hacker commented 11 years ago

Hello, Monkey, for what I can tell there are zero '.' in the lines you (or your compiler) mentioned. There are macro expansions coming from libconfuse, though. What versions of compiler and libconfuse do you have?

C0de-M0nkey commented 11 years ago

Hi Michael,

Thanks for your quick response. Yes the lack of '.' on those lines left me totally confused. I hadn't realised they contained macros though. I've checked the versions you mention;

gcc is 4.2.4 lib confuse is 2.7.1 (pulled straight from git://git.sv.gnu.org/confuse.git)

[root@thecus-sdk iii]# i686-thecus32v5-linux-gnu-g++ -v Using built-in specs. Target: i686-thecus32v5-linux-gnu Configured with: /data/Development/Home/Thecus/Toolchains/build/i686-thecus32v5-linux-gnu/targets/src/gcc-4.2.4/configure --build=x86_64-build_redhat-linux-gnu --host=x86_64-build_redhat-linux-gnu --target=i686-thecus32v5-linux-gnu --prefix=/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu --with-sysroot=/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu/i686-thecus32v5-linux-gnu//sys-root --enable-languages=c,c++ --disable-multilib --with-arch=i686 --with-pkgversion=crosstool-NG-1.5.3 --enable-__cxa_atexit --with-gmp=/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu --with-mpfr=/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu --with-local-prefix=/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu/i686-thecus32v5-linux-gnu//sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace Thread model: posix gcc version 4.2.4

Thanks

Greg

On 22 November 2013 11:53, Michael Krelin notifications@github.com wrote:

Hello, Monkey, for what I can tell there are zero '.' in the lines you (or your compiler) mentioned. There are macro expansions coming from libconfuse, though. What versions of compiler and libconfuse do you have?

— Reply to this email directly or view it on GitHubhttps://github.com/hacker/iii/issues/1#issuecomment-29067272 .

hacker commented 11 years ago

Hi Greg,

I think, the problem is here:

http://git.savannah.gnu.org/cgit/confuse.git/tree/src/confuse.h#n293

the macro uses {.string=svalue} initialiser that probably isn't supported in your compiler, 4.2 doesn't seem very old, but… It's an initialisation of a simple_value member of a cfg_opt_t structure. It's of union type. You may try changing that {.string=svalue} to (cfg_simple_t)(char**)svalue, but to tell you the truth I'm not absolutely sure if that would be a correct syntax either.

It may also be that tweaking gcc invocation with some option may enable this syntax… Unfortunately, I do not have gcc 4.2 around and compiling it will take a while. Besides, your toolchain may have a modified compiler, anyway…

But knowing where the problem is, I hope you'll be able to make it work. (I do have iiid running on qnap, but I used no prebuilt toolchains).

hacker commented 3 years ago

I hope you did eventually make it work…