Floo writes

If I try to compile your last commit, at first I get an error "no rule for conftree.cxx" as this file is renamed. If I then change to the old name conftree.cpp I get a bunch of errors. I’m not sure if anything went wrong during merging.

Cheers, Floo

medoc92 writes

Thanks for reporting this, I’ll look at this tomorrow.

medoc92 writes

I built a fresh clone with no issues. Could you please indicate on what platform you are building, and post the error messages ?

medoc92 writes

Can’t reproduce: tried deb7, fedora23, ubuntu trusty and xenial…

Floo writes

I did not use a fresh clone but used git pull to update the existing clone with the result descibed above.

Now, I prepared a fresh clone first for libupnpp and than for upmpdcli. Both compiles without any error, however, if I try to install upmpdcli I get the following error message. I use a Linux Mint 17.3 (based on Ubuntu Trusty)

florian@linux-pc-mint ~/Entwicklung/RaspberryDAC/upmpdcli $ sudo make install
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/florian/Entwicklung/RaspberryDAC/upmpdcli/missing autoheader)
rm -f src/stamp-h1
touch src/config.h.in
cd . && /bin/bash ./config.status src/config.h
config.status: creating src/config.h
depbase=`echo src/conftree.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    g++ -DHAVE_CONFIG_H -I. -I./src  -DDEBUG -g -Wall -DDATADIR=\"/usr/share/upmpdcli\" -DCONFIGDIR=\"/etc\"  -std=c++0x  -g -O2 -MT src/conftree.o -MD -MP -MF $depbase.Tpo -c -o src/conftree.o src/conftree.cpp &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/execmd.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    g++ -DHAVE_CONFIG_H -I. -I./src  -DDEBUG -g -Wall -DDATADIR=\"/usr/share/upmpdcli\" -DCONFIGDIR=\"/etc\"  -std=c++0x  -g -O2 -MT src/execmd.o -MD -MP -MF $depbase.Tpo -c -o src/execmd.o src/execmd.cpp &&\
    mv -f $depbase.Tpo $depbase.Po
In file included from src/execmd.cpp:54:0:
src/netcon.h:29:10: error: #include expects "FILENAME" or <FILENAME >
 #include MEMORY_INCLUDE
          ^
src/netcon.h:46:9: error: ‘STD_SHARED_PTR’ does not name a type
 typedef STD_SHARED_PTR<Netcon > NetconP;
         ^
src/netcon.h:159:19: error: ‘NetconP’ has not been declared
     int addselcon(NetconP con, int events);
                   ^
src/netcon.h:162:19: error: ‘NetconP’ has not been declared
     int remselcon(NetconP con);
                   ^
src/netcon.h:182:19: error: ‘NetconP’ was not declared in this scope
     std::map<int, NetconP > m_polldata;
                   ^
src/netcon.h:182:26: error: template argument 2 is invalid
     std::map<int, NetconP > m_polldata;
                          ^
src/netcon.h:182:26: error: template argument 4 is invalid
src/netcon.h:249:30: error: ‘STD_SHARED_PTR’ has not been declared
     virtual void setcallback(STD_SHARED_PTR<NetconWorker > user) {
                              ^
src/netcon.h:249:44: error: expected ‘,’ or ‘...’ before ‘<’ token
     virtual void setcallback(STD_SHARED_PTR<NetconWorker > user) {
                                            ^
src/netcon.h:258:5: error: ‘STD_SHARED_PTR’ does not name a type
     STD_SHARED_PTR<NetconWorker > m_user;
     ^
src/netcon.h: In member function ‘virtual void NetconData::setcallback(int)’:
src/netcon.h:250:9: error: ‘m_user’ was not declared in this scope
         m_user = user;
         ^
src/netcon.h:250:18: error: ‘user’ was not declared in this scope
         m_user = user;
                  ^
src/execmd.cpp: At global scope:
src/execmd.cpp:98:5: error: ‘STD_SHARED_PTR’ does not name a type
     STD_SHARED_PTR<NetconCli > m_tocmd;
     ^
src/execmd.cpp:101:5: error: ‘STD_SHARED_PTR’ does not name a type
     STD_SHARED_PTR<NetconCli > m_fromcmd;
     ^
src/execmd.cpp: In destructor ‘ExecCmdRsrc::~ExecCmdRsrc()’:
src/execmd.cpp:313:19: error: ‘class ExecCmd::Internal’ has no member named ‘m_tocmd’
         m_parent- >m_tocmd.reset();
                   ^
src/execmd.cpp:314:19: error: ‘class ExecCmd::Internal’ has no member named ‘m_fromcmd’
         m_parent- >m_fromcmd.reset();
                   ^
src/execmd.cpp: In member function ‘int ExecCmd::startExec(const string&, const std::vector<std::basic_string<char >  >&, bool, bool)’:
src/execmd.cpp:661:12: error: ‘class ExecCmd::Internal’ has no member named ‘m_tocmd’
         m- >m_tocmd = STD_SHARED_PTR<NetconCli >(iclicon);
            ^
src/execmd.cpp:661:22: error: ‘STD_SHARED_PTR’ was not declared in this scope
         m- >m_tocmd = STD_SHARED_PTR<NetconCli >(iclicon);
                      ^
src/execmd.cpp:661:46: error: expected primary-expression before ‘ >’ token
         m- >m_tocmd = STD_SHARED_PTR<NetconCli >(iclicon);
                                              ^
src/execmd.cpp:668:12: error: ‘class ExecCmd::Internal’ has no member named ‘m_fromcmd’
         m- >m_fromcmd = STD_SHARED_PTR<NetconCli >(oclicon);
            ^
src/execmd.cpp:668:24: error: ‘STD_SHARED_PTR’ was not declared in this scope
         m- >m_fromcmd = STD_SHARED_PTR<NetconCli >(oclicon);
                        ^
src/execmd.cpp:668:48: error: expected primary-expression before ‘ >’ token
         m- >m_fromcmd = STD_SHARED_PTR<NetconCli >(oclicon);
                                                ^
src/execmd.cpp: In member function ‘void ExecWriter::shutdown()’:
src/execmd.cpp:687:16: error: ‘class ExecCmd::Internal’ has no member named ‘m_tocmd’
         m_cmd- >m_tocmd.reset();
                ^
src/execmd.cpp: In member function ‘int ExecCmd::doexec(const string&, const std::vector<std::basic_string<char >  >&, const string*, std::string*)’:
src/execmd.cpp:771:37: error: ‘class ExecCmd::Internal’ has no member named ‘m_fromcmd’
             NetconCli *oclicon = m- >m_fromcmd.get();
                                     ^
src/execmd.cpp:776:34: error: ‘STD_SHARED_PTR’ was not declared in this scope
             oclicon- >setcallback(STD_SHARED_PTR<NetconWorker >
                                  ^
src/execmd.cpp:776:61: error: expected primary-expression before ‘ >’ token
             oclicon- >setcallback(STD_SHARED_PTR<NetconWorker >
                                                             ^
src/execmd.cpp:778:33: error: ‘class ExecCmd::Internal’ has no member named ‘m_fromcmd’
             myloop.addselcon(m- >m_fromcmd, Netcon::NETCONPOLL_READ);
                                 ^
src/execmd.cpp:780:16: error: ‘class ExecCmd::Internal’ has no member named ‘m_fromcmd’
             m- >m_fromcmd.reset();
                ^
src/execmd.cpp:784:37: error: ‘class ExecCmd::Internal’ has no member named ‘m_tocmd’
             NetconCli *iclicon = m- >m_tocmd.get();
                                     ^
src/execmd.cpp:789:34: error: ‘STD_SHARED_PTR’ was not declared in this scope
             iclicon- >setcallback(STD_SHARED_PTR<NetconWorker >
                                  ^
src/execmd.cpp:789:61: error: expected primary-expression before ‘ >’ token
             iclicon- >setcallback(STD_SHARED_PTR<NetconWorker >
                                                             ^
src/execmd.cpp:791:33: error: ‘class ExecCmd::Internal’ has no member named ‘m_tocmd’
             myloop.addselcon(m- >m_tocmd, Netcon::NETCONPOLL_WRITE);
                                 ^
src/execmd.cpp:793:16: error: ‘class ExecCmd::Internal’ has no member named ‘m_tocmd’
             m- >m_tocmd.reset();
                ^
src/execmd.cpp: In member function ‘int ExecCmd::send(const string&)’:
src/execmd.cpp:839:25: error: ‘class ExecCmd::Internal’ has no member named ‘m_tocmd’
     NetconCli *con = m- >m_tocmd.get();
                         ^
src/execmd.cpp: In member function ‘int ExecCmd::receive(std::string&, int)’:
src/execmd.cpp:861:25: error: ‘class ExecCmd::Internal’ has no member named ‘m_fromcmd’
     NetconCli *con = m- >m_fromcmd.get();
                         ^
src/execmd.cpp: In member function ‘int ExecCmd::getline(std::string&)’:
src/execmd.cpp:888:25: error: ‘class ExecCmd::Internal’ has no member named ‘m_fromcmd’
     NetconCli *con = m- >m_fromcmd.get();
                         ^
make: *** [src/execmd.o] Fehler 1

medoc92 writes

Something is weird: after you build, make install should not be recompiling stuff.

Did you run autogen.sh, configure, make in the upmpdcli directory after cloning it ?

Please attach the contents of config.h and conf_post.h

medoc92 writes

Ok, found it. Under certain conditions (don’t know which, but I could reproduce it on mint), autogen.sh will clobber config.h.in, deleting the last line (#include "conf_post.h"). You just need to checkout config.h.in again after running autogen.sh, re-run configure and things should work. I am going to try and find the reason why this is happening…

Floo writes

Now it runs like a charm. Yes, the last line in config.h.in was missing.

Thanks very much!

medoc92 writes

Ok, it appears that the sudo make install re-runs autoheader for some reason, and autoheader destroys config.h.in.

Apparently it happens only once: after you re-check out config.h.in and configure again, things work the next time.

So just keep in mind: when this happens, just git checkout src/config.h.in

I’m not too interested in making further enquiries, but feel free to dig, I’ll be interested by an explanation :)