| Summary: | sysutils/bareos-server 18.2.6 ndmp_address_translate_test.cc:29:20: error: no type named 'smc_element_address_assignment' | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | skillcoder <mail> | ||||
| Component: | Individual Port(s) | Assignee: | Jose Alonso Cardenas Marquez <acm> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | systemdlete | ||||
| Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(acm) |
||||
| Version: | Latest | ||||||
| Hardware: | amd64 | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
I have empty /etc/make.conf but Problem still exists still relevant, after pkg upgrade - Could you test new version of bareos? I have commited a new version with some modifications ~~~
$ uname -mrs
FreeBSD 12.0-RELEASE-p10 amd64
~~~
bareos-server-18.2.7 the same error:
```
[48/209] /usr/bin/c++ -DPROJECT_SOURCE_DIR=\"/usr/ports/sysutils/bareos-server/work/bareos-Release-18.2.7/core\" -DVERSION=\"18.2.7\" -D_FILE_OFFSET_BITS=64 -I/usr/local/include -Icore/src -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=gnu++11 -MD -MT core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o -MF core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o.d -o core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o -c core/src/tests/ndmp_address_translate_test.cc
FAILED: core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o
/usr/bin/c++ -DPROJECT_SOURCE_DIR=\"/usr/ports/sysutils/bareos-server/work/bareos-Release-18.2.7/core\" -DVERSION=\"18.2.7\" -D_FILE_OFFSET_BITS=64 -I/usr/local/include -Icore/src -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=gnu++11 -MD -MT core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o -MF core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o.d -o core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o -c core/src/tests/ndmp_address_translate_test.cc
core/src/tests/ndmp_address_translate_test.cc:29:20: error: no type named 'smc_element_address_assignment' in namespace 'directordaemon'; did you mean simply 'smc_element_address_assignment'?
void print_smc_aa (directordaemon::smc_element_address_assignment smc_elem_aa) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smc_element_address_assignment
core/src/ndmp/smc.h:82:8: note: 'smc_element_address_assignment' declared here
struct smc_element_address_assignment {
^
core/src/tests/ndmp_address_translate_test.cc:36:19: error: no type named 'smc_element_address_assignment' in namespace 'directordaemon'; did you mean simply 'smc_element_address_assignment'?
void init_smc_aa (directordaemon::smc_element_address_assignment& smc_elem_aa) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smc_element_address_assignment
core/src/ndmp/smc.h:82:8: note: 'smc_element_address_assignment' declared here
struct smc_element_address_assignment {
^
core/src/tests/ndmp_address_translate_test.cc:82:3: error: no type named 'smc_element_address_assignment' in namespace 'directordaemon'; did you mean simply 'smc_element_address_assignment'?
directordaemon::smc_element_address_assignment smc_elem_aa;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smc_element_address_assignment
core/src/ndmp/smc.h:82:8: note: 'smc_element_address_assignment' declared here
struct smc_element_address_assignment {
^
core/src/tests/ndmp_address_translate_test.cc:109:3: error: no type named 'smc_element_address_assignment' in namespace 'directordaemon'; did you mean simply 'smc_element_address_assignment'?
directordaemon::smc_element_address_assignment smc_elem_aa;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smc_element_address_assignment
core/src/ndmp/smc.h:82:8: note: 'smc_element_address_assignment' declared here
struct smc_element_address_assignment {
^
4 errors generated.
ninja: build stopped: subcommand failed.
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/sysutils/bareos-server
*** Error code 1
Stop.
make: stopped in /usr/ports/sysutils/bareos-server
```
Created attachment 210356 [details]
My bareos port config
[Please note I am not a BSD user/dev/porter, but I came across this error while porting bareos 18.2.8 to adelie linux. It may help BSD.] I found at least part of the solution. The error shown is actually exactly correct. In dird.h, #ifdef HAVE_NDMP fails because HAVE_NDMP was not set. I had assumed (as the OP probably did also) that HAVE_NDMP was set since one has to assume that bareos would not ship a tarball that breaks by default during a normal build (aside from the other changes and patches that must be made). I decided to patch the dird.h file to define HAVE_NDMP, but one could just as easily remove the bracketing #ifdef/#endif. Another way would be to pass -DHAVE_NDMP to the compiler, but that would be done via the cmake tools (or other tools the porter might choose to use). There may still be some errors remaining but at least this problem is solved. I hope this can save your team some grief in case you, like me, didn't see this very easy fix. And still yet another way is to look at the cmake files... <headslap>. It looks like they might be trying to do that there already. - Could you test with latest version of sysutils/bareos18-server (18.2.10)? - I have tested on bareos18-* bareos19-* and bareos-* ports and all of them build without problems with your default options. I close this PR. Thanks for your report |
FreeBSD 12.0-RELEASE-p10 [44/209] : && /usr/bin/c++ -O2 -pipe -march=core2 -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register -O2 -pipe -march=core2 -fstack-protector-strong -fno-strict-aliasing -L/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector-strong core/src/tools/CMakeFiles/drivetype.dir/drivetype.cc.o -o core/src/tools/drivetype -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lbareos -lbareosfind /usr/local/lib/libjansson.so && : [45/209] /usr/bin/c++ -DCERTDIR=\"/usr/ports/sysutils/bareos-server/work/bareos-Release-18.2.6/core/../regress/configs/BASE/tls\" -DPROJECT_SOURCE_DIR=\"/usr/ports/sysutils/bareos-server/work/bareos-Release-18.2.6/core\" -DTEST_SMALL_HTABLE -DVERSION=\"18.2.6\" -D_FILE_OFFSET_BITS=64 -I/usr/local/include -Icore/src -O2 -pipe -march=core2 -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register -O2 -pipe -march=core2 -fstack-protector-strong -fno-strict-aliasing -std=gnu++11 -MD -MT core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o -MF core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o.d -o core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o -c core/src/tests/ndmp_address_translate_test.cc FAILED: core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o /usr/bin/c++ -DCERTDIR=\"/usr/ports/sysutils/bareos-server/work/bareos-Release-18.2.6/core/../regress/configs/BASE/tls\" -DPROJECT_SOURCE_DIR=\"/usr/ports/sysutils/bareos-server/work/bareos-Release-18.2.6/core\" -DTEST_SMALL_HTABLE -DVERSION=\"18.2.6\" -D_FILE_OFFSET_BITS=64 -I/usr/local/include -Icore/src -O2 -pipe -march=core2 -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register -O2 -pipe -march=core2 -fstack-protector-strong -fno-strict-aliasing -std=gnu++11 -MD -MT core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o -MF core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o.d -o core/src/tests/CMakeFiles/test_ndmp_address_translate.dir/ndmp_address_translate_test.cc.o -c core/src/tests/ndmp_address_translate_test.cc core/src/tests/ndmp_address_translate_test.cc:29:20: error: no type named 'smc_element_address_assignment' in namespace 'directordaemon'; did you mean simply 'smc_element_address_assignment'? void print_smc_aa (directordaemon::smc_element_address_assignment smc_elem_aa) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smc_element_address_assignment core/src/ndmp/smc.h:82:8: note: 'smc_element_address_assignment' declared here struct smc_element_address_assignment { ^ core/src/tests/ndmp_address_translate_test.cc:36:19: error: no type named 'smc_element_address_assignment' in namespace 'directordaemon'; did you mean simply 'smc_element_address_assignment'? void init_smc_aa (directordaemon::smc_element_address_assignment& smc_elem_aa) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smc_element_address_assignment core/src/ndmp/smc.h:82:8: note: 'smc_element_address_assignment' declared here struct smc_element_address_assignment { ^ core/src/tests/ndmp_address_translate_test.cc:82:3: error: no type named 'smc_element_address_assignment' in namespace 'directordaemon'; did you mean simply 'smc_element_address_assignment'? directordaemon::smc_element_address_assignment smc_elem_aa; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smc_element_address_assignment core/src/ndmp/smc.h:82:8: note: 'smc_element_address_assignment' declared here struct smc_element_address_assignment { ^ core/src/tests/ndmp_address_translate_test.cc:109:3: error: no type named 'smc_element_address_assignment' in namespace 'directordaemon'; did you mean simply 'smc_element_address_assignment'? directordaemon::smc_element_address_assignment smc_elem_aa; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smc_element_address_assignment core/src/ndmp/smc.h:82:8: note: 'smc_element_address_assignment' declared here struct smc_element_address_assignment { ^ 4 errors generated. ninja: build stopped: subcommand failed. *** Error code 1 Stop. make[1]: stopped in /usr/ports/sysutils/bareos-server *** Error code 1 Stop. make: stopped in /usr/ports/sysutils/bareos-server