#475 closed enhancement (fixed)
Current trunk not building on linux
| Reported by: | keenriser | Owned by: | mickem |
|---|---|---|---|
| Priority: | 1 | Milestone: | |
| Component: | Core | Version: | 0.4.0-nightly |
| Severity: | Patches | Keywords: | linux build error |
| Cc: |
Description
The build on linux fails with the following errors:
{{{In file included from /home/erik/nscp/trunk/include/error.hpp:4,
from /home/erik/nscp/trunk/service/StdAfx.h:35,
from /home/erik/nscp/trunk/service/NSClient++.cpp:15:
/home/erik/nscp/trunk/include/strEx.h:277: warning: integer constant is too large for ‘long’ type
In file included from /home/erik/nscp/trunk/service/NSClient++.h:34,
from /home/erik/nscp/trunk/service/NSClient++.cpp:16:
/home/erik/nscp/trunk/service/routers.hpp: In member function ‘void nsclient::routers::add_plugin(nsclient::plugin_type)’:
/home/erik/nscp/trunk/service/routers.hpp:16: error: ‘template<class parent> struct nsclient::plugins_list’ used without template parameters
/home/erik/nscp/trunk/service/NSClient++.cpp: In member function ‘bool NSClientT::boot_init()’:
/home/erik/nscp/trunk/service/NSClient++.cpp:536: error: ‘SZAPPNAME’ was not declared in this scope
In file included from /home/erik/nscp/trunk/include/service/system_service.hpp:25,
from /home/erik/nscp/trunk/service/NSClient++.h:29,
from /home/erik/nscp/trunk/service/NSClient++.cpp:16:
/home/erik/nscp/trunk/include/service/unix_service.hpp: In member function ‘void service_helper_impl::unix_service<TBase>::start_and_wait(std::wstring) [with TBase = NSClientT]’:
/home/erik/nscp/trunk/service/cli_parser.hpp:260: instantiated from here
/home/erik/nscp/trunk/include/service/unix_service.hpp:94: warning: deprecated conversion from string constant to ‘wchar_t*’
/home/erik/nscp/trunk/service/cli_parser.hpp:260: instantiated from here
/home/erik/nscp/trunk/include/service/unix_service.hpp:96: warning: deprecated conversion from string constant to ‘wchar_t*’
make[2]: * [service/CMakeFiles/nscp.dir/NSClient++.cpp.o] Error 1
make[1]: * [service/CMakeFiles/nscp.dir/all] Error 2
make: * [all] Error 2
}}}
The attached patch fixes the build errors but as I'm not familiar with the NSClient++ code (or functionality) please review the patch with caution before applying.
Basically, I define SZAPPNAME as DEFAULT_SERVICE_NAME, but you might have wanted to replace SZAPPNAME by APPLICATION_NAME instead.
The plugin_list requires a template, I saw in similar instances in other files that pugin_list_with_listener is used instead, so I used that in routers.hpp too.
The client now builds and seems to work, although my system admin still needs to confirm this (I am but a developer).
Attachments (1)
Change History (5)
Changed 21 months ago by keenriser
comment:1 Changed 21 months ago by mickem
- Owner changed from MickeM to mickem
Yes, this is true... I though I had fixced this, must have forgotten to commit it...
It is often the case I do one commit with features and a "another one" wich fixes linux build, so Linux will not *always* build :)
I will try to setup hudson in the next few weeks to make nightly builds on Linux to rectifie this...
But thanks all the same, and please please please let me know what you think of the Linux stuff, still note sure this is a good idea or not :P
comment:2 Changed 21 months ago by mickem
- Resolution set to fixed
- Status changed from new to closed
Should be fixed now...
comment:3 Changed 21 months ago by keenriser
- Component changed from Core to CheckSystem
Fixed now, thanks :)
I discussed the project with our sysadmin and he thinks it is definitely worthwhile to have NSClient++ on Linux as well. As that will provide a more homogenous environment. We do not really have many Linux servers though, which is why the burden of installation rests with me (the developer that actually uses the box).
Unfortunately I am not really familiar with how NSClient++ actually works. I know it somehow provides management information to my sysadmin (which is good), but I haven't yet invested the time to look into it. It would be great if there could be .deb packages though. I have a (very) little experience building them so I could look into that.
I'd have to find out how this whole thing works before I commit to anything like that though. If my voice is worth anything, I say continue with the support for Linux :)
comment:4 Changed 21 months ago by keenriser
- Component changed from CheckSystem to Core
Accidentally changed component. reverted.









Diff for my changes against svn r359