Page 2 of 2
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by micke.prag
Are you sure you have the correct development package of libconfuse installed?
This is your error
Code: Select all
/home/sam/telldus/telldus-core-2.0.4/driver/libtelldus-core/SettingsConfuse.cpp:13:21: error: confuse.h: No such file or directory
Have you made sure you really have confuse.h on your computer?
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by bryanchicken
Good morning!
I installed libconfuse using:
on the box i'm cross compiling on (not for).
The confuse.h file is present in /usr/include.
I can successfully compile for x86 (local machine) now. And the executables work. I'm now only getting the confuse errors when i try to cross compile.
Do i have to install libconfuse in the toolchain somehow?
What i've done is installed the mips-gcc and mips-g++ compilers on the ubuntu box. Can't remember the exact commands but something like:
Code: Select all
apt-get install mips-linux-gnu-gcc
apt-get install mips-linux-gnu-g++
This put the executables in /usr/bin which i'm pointing to from the cmake toolchain file.
I downloaded the toolchains for dd-wrt. This is what i'm pointing at with the CMAKE_FIND_ROOT_PATH in the cmake toolchain file (i'm not even sure its necessary tbh, i mostly copied the toolchain file from the cmake tutorial on cross-compiling).
Cheers,
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by micke.prag
The toolchain file specifies CMAKE_FIND_ROOT_PATH_MODE_INCLUDE to not look in your system but only in your target. You will need to install libconfuse for your target as well, else the link-step will probably fail.
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by bryanchicken
Ok, thanks.
I have absolutely no idea how to install anything into the target.
So i changed the toolchain file to:
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
I get the same error.
I'm on the verge of giving up and returning my tellstick at the moment. Its not worth the frustration.
Surely it shouldn't be this difficult to get builds of linux software for architectures other than x86?
I could do it on the actual target system if cmake wasn't used. I've got 'make' and 'install' on there along with non-devleopment version of confuse.
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by micke.prag
Crosscompiling is always a pain!
Personally I always compile on the target machine if possible. Saves you a lot of headache.
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by bryanchicken
How important is SettingsConfuse.cpp?
I've found that if i comment out most of the method bodies and also remove references to confuse from a couple of CMakeFiles.txt that i can actually compile succesfully and get a mips tdtool executable (can't test it until tonight).
Will i still be able to issue:
tdtool -e <id>
tdtool --on <id>
tdtool --off <id>
without the functionality in that file?
Thanks for your help
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by micke.prag
We are using libconfuse to parse /etc/tellstick.conf and /var/state/telldus-core.conf.
Feel free to implement it in any other way you like.
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by micke.prag
bryanchicken wrote:
Will i still be able to issue:
tdtool -e <id>
tdtool --on <id>
tdtool --off <id>
without the functionality in that file?
No, not if you don't implement any other settings backend yourself.
Re: help with homeeasy on MIPS linux
Posted: Fri Mar 17, 2023 9:45 am
by bryanchicken
Ok, thanks for the info.
Now i've got it building correctly (i think) i'll have a poke around in the code, like i keep saying i'm not a C/C++ developer, but i'll have a go.
If it get anything working i'll post it back here just in case anyone else wants homeeasy learning on dd-wrt!
I'm guessing you don't want another episode like this one!
Cheers,