Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building fails despite latest tinyxml (Linux Mint 17.3 / Ubuntu 14.04.5) #20

Closed
ginsterbusch opened this issue Oct 12, 2016 · 9 comments

Comments

@ginsterbusch
Copy link

Both building with the latest commit and release 0.4.0 fails under Linux Mint 17.3 (aka Ubuntu 14.04.5 LTS):

/home/fwolf/inst/sources/logitech-g710/sidewinderd/sidewinderd-0.4.0/src/core/keyboard.cpp: In member function ‘void Keyboard::recordMacro(std::string, Led*, int)’:
/home/fwolf/inst/sources/logitech-g710/sidewinderd/sidewinderd-0.4.0/src/core/keyboard.cpp:125:17: error: ‘class tinyxml2::XMLElement’ has no member named ‘SetText’
     DelayEvent->SetText(static_cast<int>(delay));
                 ^
/home/fwolf/inst/sources/logitech-g710/sidewinderd/sidewinderd-0.4.0/src/core/keyboard.cpp:138:19: error: ‘class tinyxml2::XMLElement’ has no member named ‘SetText’
    KeyBoardEvent->SetText(inev.code);

Installed dependencies:

  • libconfig: 1.4.9-2 (package: libconfig++9)
  • tinyxml2: 2.6.2 (package: libtinyxml2.6.2)
  • libudev: 204-5ubuntu20 (package: libudev-dev)

cu, w0lf.

@ginsterbusch
Copy link
Author

Note: There is no newer libudev. At least not on 14.04. And I wouldnt want to compromise my otherwise very stable system.

cu, w0lf.

@tolga9009
Copy link
Owner

Hi,

you've installed TinyXML_1_ version 2.6.2. But you need to install TinyXML2 (current version: 4.x): https://launchpad.net/ubuntu/+source/tinyxml2

They are 2 different libraries. I know, it's a bit confusing, but the naming / versioning of TinyXML2 wasn't my idea :).

What I don't get is, that CMake doesn't throw an error, but the compiler is. I will look, if I can get a better search for TinyXML2 libraries.

Report back, if there are any other issues or the issue persists.

Cheers,
Tolga

@ginsterbusch
Copy link
Author

ginsterbusch commented Oct 12, 2016

you've installed TinyXML1 version 2.6.2. But you need to install TinyXML2 (current version: 4.x): https://launchpad.net/ubuntu/+source/tinyxml2

nasty. got myself the proper backports repository added (after figuring out that checking "backports" in synaptic didnt work as expected; probably some Linux Mint idiocy backfiring), installed version 2.1 .. now let's see if THAT helps ;)

cu, w0lf.

ps: I got the proper version before, but it was the one listed as 0-git(something). That's probably why at first, everything is working, but then failing.

@ginsterbusch
Copy link
Author

ginsterbusch commented Oct 12, 2016

Ok, seems to work now. Had to change some settings with checkinstall before building the package to avoid overwriting a preexisting one.

Maybe you want to add that as build instructions for GNU/Debian and Ubuntu .. ;)

cu, w0lf.

@tolga9009
Copy link
Owner

tolga9009 commented Oct 12, 2016

Hi there,

glad you got it working! Yeah, I really don't understand, why they made the naming scheme is so damn confusing. There are:

  • libtinyxml2-0.0.0 (trusty universe, doesn't work, too old version)
  • libtinyxml2-2 (trusty backports, works)
  • libtinyxml2-2v5 (xenial universe, works)
  • libtinyxml2-4 (yakkety universe, works)
  • libtinyxml2.6.2 (trusty universe, doesn't work, this is TinyXML1)
  • libtinyxml2.6.2v5 (xenial universe, doesn't work, this is TinyXML1)

Even CMake gets confused and reports a false positive for TinyXML2 library. This is why I was thinking about dropping TinyXML2 and libconfig++ altogether and using jsoncpp for both, config and macros, as it would make the code both easier and slimmer. And we would only need a single library instead of 2. I'm still not absolutely sure about this, but it sounds very attracting.

I will leave this issue open for tracking the CMake issue. I really want CMake to report whether TinyXML2 is correctly installed or not.

I personally think the current, general build instructions are enough to compile and run sidewinderd on various Linux distributions. The (confusing) package naming scheme of various distros are out of my scope.

Instead of writing instructions for various Linux distros, I'd rather like to offer packages for the most popular ones. This would eliminate these kind of issues completely. We need a PPA for Ubuntu 14.04 LTS and Ubuntu 16.04 LTS, aswell as packages for Fedora and RHEL / CentOS. I've already created an AUR for Arch Linux.

Cheers,
Tolga

@tolga9009 tolga9009 reopened this Oct 12, 2016
@ginsterbusch
Copy link
Author

ginsterbusch commented Oct 12, 2016

I wouldn't call GNU/Debian and Ubuntu "various" distros, but for now, a simple wiki entry might do.

I certainly don't know how to create a PPA, .. If I get sidewinderd working under Linux Mint 17.3 aka "pimped" Ubuntu 14.04.5 LTS (because there is no systemd!), I'm considering setting one up for Ubuntu, and maybe Debian 8, too. That naturally includes Linux Mint as well.

cu, w0lf.

@tolga9009
Copy link
Owner

Don't get me wrong, I was generally talking about differencies in Linux distributions (and package naming), I can't include package names for all of them. If CentOS calls their apache service httpd, it's not my job to make things clear for CentOS users in my distribution-independent documentation.

Here on GitHub, I'm a software developer, not a package maintainer. In terms of documentation, I think it's understandable, which libraries this software depends on (TinyXML2, and which commands need to be executed, in order to build.

That aside, I think it's a much greater help for new (Linux Mint / Ubuntu / Debian) users to create a PPA and / or a .deb for them, which installs with a single command or single click.

About no systemd: that shouldn't be a problem, as long as udev is available. Just use an init script, which launches sidewinderd -d on boot (-d flag for "legacy" daemon mode. Note: not needed for systemd users. as it automatically takes care of that). Fedora / CentOS 7 / Ubuntu 16.04 and Debian Jessie all use systemd and shouldn't need any adjustments.

I'll look into setting up Ubuntu PPAs aswell.

Cheers,
Tolga

@salman2learn
Copy link

For ubuntu 16.04 fresh install, this set worked for me:
sudo apt install cmake libconfig++8-dev libtinyxml2-dev libudev-dev

Thanks.

@tolga9009
Copy link
Owner

Thank you @salman2learn! Based on your post, I've added basic instructions to the Wiki for Ubuntu 16.04.x LTS. Feel free to improve!

PPA would still be the best solution, but didn't have success so far. Either way, I'm closing this issue, as we have the exact commands for Ubuntu users now and they should do the trick.

Cheers,
Tolga

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants