telldus-core on Ubuntu 16.10

Moderator: Telldus

Post Reply
hlund
Posts: 3
Joined: Thu Jan 18, 2018 11:08 am

telldus-core on Ubuntu 16.10

Post by hlund » Thu Jan 18, 2018 11:08 am

Hi,

I've upgraded my server to Ubuntu 16.10 and now I can't get the package telldus-core to install.

The package (.deb file) depends on libconfuse0 which is not available on 16.10. The Ubuntu team has upgraded to libconfuse1 (v3.0)

I have tried to build telldus-core from source, but it won't compile on ubuntu 16.10 due to several errors during compilation.

Any suggestions?

Best regards,
Hlund

JohanUmea
Posts: 1
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by JohanUmea » Thu Jan 18, 2018 11:08 am

I have same problem.

My solution for now has been to move everything to another system with debian.

Still want a solution to the original problem.

hlund
Posts: 3
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by hlund » Thu Jan 18, 2018 11:08 am

Unfortenately it looks like Telldus abandoned telldus-core years ago... :(

It would be nice if one could get telldus-core to compile with a newer compiler and the new libs on linux (ubuntu 16.10)

/Hlund
Last edited by hlund on Sun Jan 15, 2017 3:46 pm, edited 1 time in total.

hlund
Posts: 3
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by hlund » Thu Jan 18, 2018 11:08 am

I have now solved the problem by compliling telldus-core 2.1.2 from source.

I installed libconfuse1 from the ubuntu package repos (telldus package depends on libconfuse0 that is not present in ubuntu repos anymore)

After unpacking the telldus-core source I completed CmakeLists.txt with the following lines

Code: Select all

SET(FORCE_COMPILE_FROM_TRUNK TRUE)
SET(GCC_COVERAGE_COMPILE_FLAGS "-Wno-narrowing")
SET(GCC_COVERAGE_LINK_FLAGS "-pthread -lpthread")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
After these changes I was able to compile the source and install it!

/Hlund

Redg
Posts: 10
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by Redg » Thu Jan 18, 2018 11:08 am

Hi hlund!

I tried your "hack", but I get all kinds of errors. First in the cmake:

Code: Select all

cmake .
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'libftdi'
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11")
CMake Error: File /home/redg/telldus-core-2.1.2/Doxyfile.in does not exist.
CMake Error at CMakeLists.txt:64 (CONFIGURE_FILE):
  configure_file Problem configuring file


-- Configuring incomplete, errors occurred!
See also "/home/redg/telldus-core-2.1.2/CMakeFiles/CMakeOutput.log".
See also "/home/redg/telldus-core-2.1.2/CMakeFiles/CMakeError.log".
That one I solved by touch Doxyfile.in after reading somewhere that it could be done that way, after that Cmake went fine.

Did find the real Doxyfile.in on git https://raw.githubusercontent.com/telld ... oxyfile.in
So this is solved...

Next is a wnarrowing error....

Code: Select all

/home/redg/telldus-core-2.1.2/service/ProtocolIkea.cpp: In member function ‘virtual std::__cxx11::string ProtocolIkea::getStringForMethod(int, unsigned char, Controller*)’:
/home/redg/telldus-core-2.1.2/service/ProtocolIkea.cpp:26:27: error: narrowing conversion of ‘170’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
  const char B0[] = {170, 0};
                           ^
I tried removing the ProtocollIkea.cpp and .h, I dont use them, but then it throw the same errror on another protocoll...

I'm on Xubuntu 16.10, downloaded every -dev and lib packege I can think of after looking on different how-tos when I have googled some of the errors I've got...

I'm no programer and only have some idea of how things work... I can type cmake and make :P

Do you have any clue what I might be doing wrong?

Have I added your lines in the wrong place (I added them last) in CMakeLists.txt.

Jaxån
Posts: 183
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by Jaxån » Thu Jan 18, 2018 11:08 am

Doxygen isn't needed to compile.

What I have problems with is that pthread_create isn't found.

I have added in end of telldus-core-2.1.2/CMakeList.txt
SET(FORCE_COMPILE_FROM_TRUNK TRUE) etc from above.

It looks like you have spelled something wrong, as there are a "-Wno-narrowing" in the CMakeList.txt, but you compile with "-Wnarrowing"

[ 96%] Linking CXX executable tdtool
cd /home/openhab/telldus-tmp/telldus-core-2.1.2/build/tdtool && /usr/bin/cmake -E cmake_link_script CMakeFiles/tdtool.dir/link.txt --verbose=1
/usr/bin/aarch64-linux-gnu-g++ -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -Wl,-Bsymbolic-functions -Wl,-z,relro CMakeFiles/tdtool.dir/main.cpp.o -o tdtool -L/home/openhab/telldus-tmp/telldus-core-2.1.2/build/client -rdynamic -ltelldus-core -Wl,-rpath,/home/openhab/telldus-tmp/telldus-core-2.1.2/build/client:
/home/openhab/telldus-tmp/telldus-core-2.1.2/build/client/libtelldus-core.so: undefined reference to `pthread_create'
/home/openhab/telldus-tmp/telldus-core-2.1.2/build/client/libtelldus-core.so: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
tdtool/CMakeFiles/tdtool.dir/build.make:98: recipe for target 'tdtool/tdtool' failed
make[3]: *** [tdtool/tdtool] Error 1
Last edited by Jaxån on Mon Feb 06, 2017 9:48 am, edited 2 times in total.
Använder inte MSN eller ICQ. Bara XMPP (Jabber): anders.jackson@astrakan.hig.se

niclasf
Posts: 162
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: telldus-core on Ubuntu 16.10

Post by niclasf » Thu Jan 18, 2018 11:08 am

Have you included the flag "-lpthread" in the command line to the compiler?

Jaxån
Posts: 183
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by Jaxån » Thu Jan 18, 2018 11:08 am

EDIT: A ) to much. Works when editing CMakeLines.txt in telldus-core-1.2.1/{tdtools,tdadmin}.

Hmm, it doesn't look like build of tdtool add those from telldus-core-1.2.1/CMakeLines.txt when linking and compile.

Downloaded with
$ apt-get source telldus-core

Added to end of telldus-core-2.1.2/tdtools/CMakeLines.txt after
INSTALL(TARGETS tdtool RUNTIME DESTINATION bin)

SET(FORCE_COMPILE_FROM_TRUNK TRUE)
SET(GCC_COVERAGE_COMPILE_FLAGS "-Wno-narrowing")
SET(GCC_COVERAGE_LINK_FLAGS "-pthread -lpthread")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")

Compiling
EDIT: works when removed the typo.
$ apt-get --compile source telldus-core

I got lots of linkage error though...

dh_makeshlibs
dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libtelldus-core2/DEBIAN/symbols doesn't match completely debian/libtelldus-core2.symbols
--- debian/libtelldus-core2.symbols (libtelldus-core2_2.1.2-1_arm64)
+++ dpkg-gensymbolsQ_aMEg 2017-02-06 10:04:02.000000000 +0000
@@ -1,15 +1,23 @@
libtelldus-core.so.2 libtelldus-core2 #MINVER#
- (optional)_ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPwEES4_T_S5_RKS1_St20forward_iterator_tag@Base 2.1.2
+#MISSING: 2.1.2-1# (optional)_ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPwEES4_T_S5_RKS1_St20forward_iterator_tag@Base 2.1.2
(optional)_ZNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv@Base 2.1.2
(optional)_ZNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv@Base 2.1.2
- (optional)_ZNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED0Ev@Base 2.1.2
- (optional)_ZNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED1Ev@Base 2.1.2
- (optional)_ZNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev@Base 2.1.2
+#MISSING: 2.1.2-1# (optional)_ZNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED0Ev@Base 2.1.2
+#MISSING: 2.1.2-1# (optional)_ZNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED1Ev@Base 2.1.2
+#MISSING: 2.1.2-1# (optional)_ZNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev@Base 2.1.2
+ _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag@Base 2.1.2-1
+ _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPwEEvT_S7_St20forward_iterator_tag@Base 2.1.2-1
+ _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED0Ev@Base 2.1.2-1
+ _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED1Ev@Base 2.1.2-1
+ _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED2Ev@Base 2.1.2-1
+ _ZNSt7__cxx1115basic_stringbufIwSt11char_traitsIwESaIwEED0Ev@Base 2.1.2-1
+ _ZNSt7__cxx1115basic_stringbufIwSt11char_traitsIwESaIwEED1Ev@Base 2.1.2-1
+ _ZNSt7__cxx1115basic_stringbufIwSt11char_traitsIwESaIwEED2Ev@Base 2.1.2-1
(optional)_ZTINSt3tr111_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EEE@Base 2.1.2
(optional)_ZTINSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EEE@Base 2.1.2
(optional)_ZTSNSt3tr111_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EEE@Base 2.1.2
(optional)_ZTSNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EEE@Base 2.1.2
- (optional)_ZTVNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EEE@Base 2.1.2
+#MISSING: 2.1.2-1# (optional)_ZTVNSt3tr116_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EEE@Base 2.1.2
tdAddDevice@Base 2.1.0
tdBell@Base 2.1.0
tdClose@Base 2.1.0
dh_installdeb
dh_shlibdeps
dpkg-shlibdeps: warning: symbol pthread_join used by debian/libtelldus-core2/usr/lib/libtelldus-core.so.2.1.2 found in none of the libraries
dpkg-shlibdeps: warning: symbol pthread_create used by debian/libtelldus-core2/usr/lib/libtelldus-core.so.2.1.2 found in none of the libraries
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/telldus-core/usr/bin/tdtool debian/telldus-core/usr/sbin/telldusd were not linked against ld-linux-aarch64.so.1 (they use none of the library's symbols)
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: bygger paketet "libtelldus-core-dev" i "../libtelldus-core-dev_2.1.2-1_arm64.deb".
dpkg-deb: bygger paketet "libtelldus-core2" i "../libtelldus-core2_2.1.2-1_arm64.deb".
dpkg-deb: bygger paketet "telldus-core" i "../telldus-core_2.1.2-1_arm64.deb".
dpkg-genchanges -b >../telldus-core_2.1.2-1_arm64.changes
dpkg-genchanges: binary-only upload (no source code included)
dpkg-source --after-build telldus-core-2.1.2
dpkg-buildpackage: binary-only upload (no source included)

Will try this later, when I connect telldus to my PINE64 with openHAB 2.0
Använder inte MSN eller ICQ. Bara XMPP (Jabber): anders.jackson@astrakan.hig.se

peterpops
Posts: 3
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by peterpops » Thu Jan 18, 2018 11:08 am

is this a working solution for ubuntu 16.04/10 ?

edit:
got it to compile on my ubuntu 16.04 server, but i get those errors in dmesg when trying to send --off command with tdtool:
usbfs: USBDEVFS_CONTROL failed cmd telldusd rqt 128 rq 6 len 255 ret -110


anyone got a solution for this ?

chrisq
Posts: 3
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by chrisq » Thu Jan 18, 2018 11:08 am

peterpops wrote:is this a working solution for ubuntu 16.04/10 ?

edit:
got it to compile on my ubuntu 16.04 server, but i get those errors in dmesg when trying to send --off command with tdtool:
usbfs: USBDEVFS_CONTROL failed cmd telldusd rqt 128 rq 6 len 255 ret -110


anyone got a solution for this ?

You could always run telldusd in a docker container with an older ubuntu as base image.

Jaxån
Posts: 183
Joined: Thu Jan 18, 2018 11:08 am

Re: telldus-core on Ubuntu 16.10

Post by Jaxån » Thu Jan 18, 2018 11:08 am

A hack to make this run, but I am not shore that Docker works on my ARM64 machine.
Använder inte MSN eller ICQ. Bara XMPP (Jabber): anders.jackson@astrakan.hig.se

Post Reply