[ https://issues.apache.org/jira/browse/QPID-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006879#comment-13006879 ]
Sudip Kumar Panda commented on QPID-1811: ----------------------------------------- Thanks Steve. Since the defect was filed for failure on freebsd build and the defect is resolved, I thought all the issues are resolved. Probably, I can spend some of my time (when free) to write lower level poller code. > Unable to compile qpid on FreeBSD > --------------------------------- > > Key: QPID-1811 > URL: https://issues.apache.org/jira/browse/QPID-1811 > Project: Qpid > Issue Type: Sub-task > Components: C++ Broker > Affects Versions: 0.6 > Environment: FreeBSD 8-CURRENT on amd64 (64 bit) > $ g++ -v > Using built-in specs. > Target: amd64-undermydesk-freebsd > Configured with: FreeBSD/amd64 system compiler > Thread model: posix > gcc version 4.2.1 20070719 [FreeBSD] > $ python -V > Python 2.6.1 > $ pkg_info | grep boost > boost-python-1.37.0 Free peer-reviewed portable C++ source libraries > svn trunk version, checked out now (r765092) > ./configure CPPFLAGS="-I/usr/local/include -L/usr/local/lib" > LDFLAGS="-L/usr/local/lib" --with-poller=poll > Reporter: Attila Nagy > Assignee: Andrew Stitcher > Priority: Critical > Fix For: 0.7 > > Attachments: freebsd.patch, qpidfbsdcompile.diff, sasl.diff > > > I'm trying to build qpid c++ broker on FreeBSD. > Problems found during the build process: > ---------------------------------------------------------------------8<--------------------------------------------------------------------- > g++ -DHAVE_CONFIG_H -I. -Igen -I./gen -I/usr/local/include -Werror -pedantic > -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align > -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers > -Woverloaded-virtual -g -O2 -MT qpid/sys/posix/Thread.lo -MD -MP -MF > qpid/sys/posix/.deps/Thread.Tpo -c qpid/sys/posix/Thread.cpp -fPIC -DPIC -o > qpid/sys/posix/.libs/Thread.o > qpid/sys/posix/Thread.cpp: In member function 'long unsigned int > qpid::sys::Thread::id()': > qpid/sys/posix/Thread.cpp:64: error: invalid conversion from 'pthread*' to > 'long unsigned int' > I don't know whether it helps during the run, but allows to compile: > return (unsigned long)impl->thread; > ---------------------------------------------------------------------8<--------------------------------------------------------------------- > g++ -DHAVE_CONFIG_H -I. -Igen -I./gen -I/usr/local/include -Werror -pedantic > -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align > -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers > -Woverloaded-virtual -g -O2 -MT qpid/sys/posix/SystemInfo.lo -MD -MP -MF > qpid/sys/posix/.deps/SystemInfo.Tpo -c qpid/sys/posix/SystemInfo.cpp -fPIC > -DPIC -o qpid/sys/posix/.libs/SystemInfo.o > In file included from qpid/sys/posix/SystemInfo.cpp:25: > /usr/include/net/if.h:293: error: field 'ifru_addr' has incomplete type > /usr/include/net/if.h:294: error: field 'ifru_dstaddr' has incomplete type > /usr/include/net/if.h:295: error: field 'ifru_broadaddr' has incomplete type > /usr/include/net/if.h:327: error: field 'ifra_addr' has incomplete type > /usr/include/net/if.h:328: error: field 'ifra_broadaddr' has incomplete type > /usr/include/net/if.h:329: error: field 'ifra_mask' has incomplete type > /usr/include/net/if.h:427: error: field 'addr' has incomplete type > /usr/include/net/if.h:428: error: field 'dstaddr' has incomplete type > qpid/sys/posix/SystemInfo.cpp: In function 'void > qpid::sys::SystemInfo::getLocalIpAddresses(uint16_t, > std::vector<qpid::Address, std::allocator<qpid::Address> >&)': > qpid/sys/posix/SystemInfo.cpp:63: error: 'PF_INET' was not declared in this > scope > qpid/sys/posix/SystemInfo.cpp:63: error: 'SOCK_STREAM' was not declared in > this scope > qpid/sys/posix/SystemInfo.cpp:63: error: 'socket' was not declared in this > scope > qpid/sys/posix/SystemInfo.cpp:66: error: 'struct ifreq' has no member named > 'ifr_ifindex' > qpid/sys/posix/SystemInfo.cpp:67: error: 'SIOCGIFNAME' was not declared in > this scope > qpid/sys/posix/SystemInfo.cpp:72: error: 'union ifreq::<anonymous>' has no > member named 'ifru_addr' > qpid/sys/posix/SystemInfo.cpp:73: error: invalid use of incomplete type > 'struct qpid::sys::sockaddr_in' > qpid/sys/posix/SystemInfo.cpp:72: error: forward declaration of 'struct > qpid::sys::sockaddr_in' > The "incomplete type" error can be fixed by including sys/socket.h before > net/if.h. > The "'struct ifreq' has no member named 'ifr_ifindex'" can be fixed by: > #ifdef __FreeBSD__ > ifr.ifr_index = i; > #else > ifr.ifr_ifindex = i; > #endif > The "'SIOCGIFNAME' was not declared in this scope" is hopefully solved by: > #ifdef SIOCGIFNAME > if (::ioctl (s, SIOCGIFNAME, &ifr) < 0) > #else > if (!if_indextoname(ifr.ifr_index, ifr.ifr_name)) > #endif > break; > The "forward declaration of 'struct qpid::sys::sockaddr_in'" can be solved by > including net/pfvar.h after if.h > ---------------------------------------------------------------------8<--------------------------------------------------------------------- > g++ -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual > -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch > -Wno-system-headers -Woverloaded-virtual > -DMODULE_DIR=\"/usr/local/lib/qpid/daemon\" > -DCONF_FILE=\"/usr/local/etc/qpidd.conf\" -g -O2 -o .libs/qpidd qpidd-qpidd.o > posix/qpidd-QpiddBroker.o -L/usr/local/lib -L/usr/lib/openais > -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync > ./.libs/libqpidbroker.so /test/qpid/qpid/cpp/src/.libs/libqpidcommon.so > ./.libs/libqpidcommon.so -lboost_program_options -lboost_filesystem -luuid > -Wl,--rpath -Wl,/usr/local/lib > /test/qpid/qpid/cpp/src/.libs/libqpidcommon.so: undefined reference to > `qpid::sys::Poller::interrupt(qpid::sys::PollerHandle&)' > /test/qpid/qpid/cpp/src/.libs/libqpidcommon.so: undefined reference to > `typeinfo for qpid::sys::PollerHandle' > ./.libs/libqpidbroker.so: undefined reference to > `qpid::sys::Poller::shutdown()' > /test/qpid/qpid/cpp/src/.libs/libqpidcommon.so: undefined reference to > `qpid::sys::PollerHandle::~PollerHandle()' > ./.libs/libqpidbroker.so: undefined reference to `qpid::sys::Poller::Poller()' > /test/qpid/qpid/cpp/src/.libs/libqpidcommon.so: undefined reference to > `qpid::sys::Poller::addFd(qpid::sys::PollerHandle&, > qpid::sys::Poller::Direction)' > /test/qpid/qpid/cpp/src/.libs/libqpidcommon.so: undefined reference to > `qpid::sys::Poller::delFd(qpid::sys::PollerHandle&)' > /test/qpid/qpid/cpp/src/.libs/libqpidcommon.so: undefined reference to > `qpid::sys::PollerHandle::PollerHandle(qpid::sys::IOHandle const&)' > /test/qpid/qpid/cpp/src/.libs/libqpidcommon.so: undefined reference to > `qpid::sys::Poller::modFd(qpid::sys::PollerHandle&, > qpid::sys::Poller::Direction)' > This will be harder. :( > I think it would be nice to have at least a standard select/poll interface. > Going straight with (and only with) the specialised OS-dependent interfaces > seem to be a bad idea for the poor people, not running Linux (or Solaris, or > Windows, if they work correctly). > BTW, shouldn't using libevent or libev would be more logical? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org