cross-compilation in openwrt fails #68

Closed
leggewie opened this Issue Mar 31, 2015 · 34 comments

Projects

None yet

3 participants

@leggewie
Contributor

This came up during a test build for openwrt #62 but it possibly hints at something of wider significance.
Unfortunately, github is stupid and you can't even attach a txt file (seriously? Hello?!) so I will link the build log to a pastebin here that will expire in 90 days. http://paste.debian.net/164080/

@leggewie
Contributor

Injecting -Wno-error=return-type to TARGET_CFLAGS didn't seem to paper over this problem;

mipsel-openwrt-linux-uclibc-g++ -o build/release/apps/freelan/src/configuration_helper.o -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/usr/lib/libiconv-stub/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/usr/lib/libintl-stub/include -Wno-error=return-type -I/media/rolf/DATA/tmp/compile/wrt/git/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/freelan2-2014-06-22/ipkg-install/usr/include -Wno-missing-field-initializers --std=c++11 -Wall -Wextra -Werror -pedantic -Wshadow -isystem third-party/install/include -Ibuild/release/include build/release/apps/freelan/src/configuration_helper.cpp

The failure still remained the same.

@ereOn
Member
ereOn commented Mar 31, 2015

@leggewie What version did you compile ? The error seems to happen on a line that was changed a while back.

@ereOn
Member
ereOn commented Apr 12, 2015

@leggewie Ping ?

@ereOn ereOn added this to the 2.0 milestone Apr 12, 2015
@leggewie
Contributor

Sorry about the delay in responding. Somehow, your comment didn't get on my radar. Thank you for the ping.

It seems that the latest proposal by @champtar in #62 was to compile against 22873e1. That is indeed almost 10 months old. I'll retry with a more recent commit when I have the time.

@ereOn
Member
ereOn commented Apr 15, 2015

@leggewie No problem. I plan to release real soon now, so I'd just wanted to make sure there was nothing else we could change to avoid having to re-release soon after.

@leggewie
Contributor

OK. I was able to try a build against the latest HEAD 20894fd and it seems now a different issue comes up.
build/release/lib/libmongooseplus.a: error adding symbols: File in wrong format

@ereOn
Member
ereOn commented Apr 16, 2015

@leggewie I don't have much experience with those kind of builds but here are some things I could find, looking for the error message you get:

Have you cleaned everything before you built ? Could it be that compilation options differ between the linking phase and the compilation phase ?

For instance I see there is a -mips32 option defined during compilation. Could it be it is also needed when linking ?

Sadly I can just guess at this point. Is there anyway for me to replicate your build environment without specific hardware ?

@leggewie
Contributor

I've prepared a ready-to-use openwrt cross-compile environment for you to download. You can simply enter the openwrt directory and issue a "make V=99".

http://wiki.openwrt.org/doc/howto/build

@ereOn
Member
ereOn commented Apr 17, 2015

@leggewie That is awesome @leggewie ! I'll check this out this week-end and keep you posted should I make any progress on the matter :)

@ereOn
Member
ereOn commented Apr 18, 2015

@leggewie The download link you gave me does not work. Any chance you can post that elsewhere ?

@leggewie
Contributor

I'm sorry about that. I created a new link.

@ereOn
Member
ereOn commented Apr 19, 2015

@leggewie I managed to compile FreeLAN for OpenWRT.

I based my work out of your archive but rebased it on top of the current OpenWRT master.

It wasn't easy, and not only because I didn't knew OpenWRT at all : mostly because FreeLAN SCons scripts needed some tweaking. That being said : the SCons scripts no longer have OpenWRT specific code. They should work better for all platforms out there.

Here is a patch file for the changes.

Let me if that works for you too !

Now that I played with OpenWRT a bit : I'm not sure I want to keep #62. It doesn't make much sense to have OpenWRT specific configuration files in the FreeLAN repository when OpenWRT has its own repository system. What do you think ?

@champtar This might be of interest to you too. :)

@ereOn ereOn modified the milestone: 2.0, 3.0 May 8, 2015
@leggewie
Contributor

For the longest time, boost fails to build for me in openwrt. Do you have the same problem?

@ereOn
Member
ereOn commented Jun 21, 2015

I haven't tried in a while I have to say. And I'm not too experienced with OpenWRT.

What is the error you get ?

@leggewie
Contributor

The error depends on the way I build freelan and might be unrelated to freelan. When I try to build the package by itself then boost fails to build. It sounds like something is broken in openwrt here. When building with "make menuconfig;make" I get the following error.

                 from build/release/include/freelan/configuration.hpp:55,
                 from build/release/apps/freelan/src/configuration_helper.hpp:50,
                 from build/release/apps/freelan/src/configuration_helper.cpp:47:
/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include/sys/poll.h:1:2: error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror=cpp]
 #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
  ^
cc1plus: all warnings being treated as errors
scons: *** [build/release/apps/freelan/src/configuration_helper.o] Error 1
scons: building terminated because of errors.
make[3]: *** [/media/rolf/DATA/tmp/compile/wrt/git/build_dir/target-mipsel_mips32_musl-1.1.10/freelan-2015-04-19/.configured_yyyyyyyyyyn] Error 2
make[3]: Leaving directory `/usr/src/wrt/my-feed/net/freelan'
make[2]: *** [package/feeds/Rolf/freelan/compile] Error 2
make[2]: Leaving directory `/media/rolf/DATA/tmp/compile/wrt/git'
make[1]: *** [/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/stamp/.package_compile] Error 2
make[1]: Leaving directory `/media/rolf/DATA/tmp/compile/wrt/git'
make: *** [world] Error 2

That sounds like a simple glitch in linking which wouldn't have to be treated as an error but should be easy enough to fix.

@leggewie
Contributor

I managed to get past that warning with "TARGET_CFLAGS += -Wno-error=cpp" now, but then ran into the following

/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/variant/variant.hpp: In instantiation of 'void boost::variant<T0, TN>::operator!=(const U&) const [with U = asiotap::hostname_endpoint; T0_ = asiotap::hostname_endpoint; TN = {asiotap::ip_endpoint<boost::asio::ip::address_v4>, asiotap::ip_endpoint<boost::asio::ip::address_v6>}]':
build/release/libs/freelan/src/curl.cpp:149:49:   required from here
/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/variant/variant.hpp:2211:9: error: static assertion failed: false && sizeof(U)
         BOOST_STATIC_ASSERT( false && sizeof(U) );
         ^
scons: *** [build/release/libs/freelan/src/curl.o] Error 1
scons: building terminated because of errors.
@ereOn
Member
ereOn commented Jun 23, 2015

I never had that.

Is the compiler from your toolchain fully C++11 compatible ?

@leggewie
Contributor

OpenWRT builds its own toolchain so I assume we must have the same, no?

@zoopp
Contributor
zoopp commented Jul 17, 2015

This comment isn't really OpenWRT specific but it might be related. Before I go any further I should mention that I don't have a lot of knowledge about freelan or boost and as a consequence what I say might not be correct.

Anyway, I tried to build the 2.0 release on my Archlinux machine and I get a similar error to @leggewie.

g++ -o build/release/libs/freelan/src/curl.o -c -Wno-missing-field-initializers --std=c++11 -Wall -Wextra -Werror -pedantic -Wshadow -O3 -isystem third-party/install/include -DFREELAN_INSTALL_PREFIX="\"/\"" -Ibuild/release/libs/freelan/include/freelan -Ibuild/release/include build/release/libs/freelan/src/curl.cpp
build/release/libs/freelan/src/curl.cpp: In member function ‘void freelan::curl::set_proxy(const endpoint&)’:
build/release/libs/freelan/src/curl.cpp:149:13: error: could not convert ‘(& proxy)->boost::variant<T0, TN>::operator!=<asiotap::hostname_endpoint>(asiotap::hostname_endpoint::null()())’ from ‘void’ to ‘bool’
   if (proxy != asiotap::hostname_endpoint::null())
             ^
In file included from /usr/include/boost/date_time/time_duration.hpp:14:0,
                 from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16,
                 from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
                 from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:12,
                 from /usr/include/boost/asio/time_traits.hpp:23,
                 from /usr/include/boost/asio/deadline_timer_service.hpp:27,
                 from /usr/include/boost/asio/basic_deadline_timer.hpp:25,
                 from /usr/include/boost/asio.hpp:22,
                 from build/release/libs/freelan/src/curl.hpp:51,
                 from build/release/libs/freelan/src/curl.cpp:46:
/usr/include/boost/variant/variant.hpp: In instantiation of ‘void boost::variant<T0, TN>::operator!=(const U&) const [with U = asiotap::hostname_endpoint; T0_ = asiotap::hostname_endpoint; TN = {asiotap::base_ip_endpoint<boost::asio::ip::address_v4>, asiotap::base_ip_endpoint<boost::asio::ip::address_v6>}]’:
build/release/libs/freelan/src/curl.cpp:149:49:   required from here
/usr/include/boost/variant/variant.hpp:2211:9: error: static assertion failed: false && sizeof(U)
         BOOST_STATIC_ASSERT( false && sizeof(U) );
         ^
scons: *** [build/release/libs/freelan/src/curl.o] Error 1

I dug around and found out that proxy is an boost::variant<hostname_endpoint, ipv4_endpoint, ipv6_endpoint>.

Now at line 149 in libs/freelan/src/curl.cpp, there is a comparison between a boost::variant<hostname_endpoint, ipv4_endpoint, ipv6_endpoint> and a asio::hostaname_endpoint. Overload resolutions leads to selecting the boost::variant<...>::operator != operator used in preventing comparison with foreign types. This, along with the other comparison operators that are part of boost::variant makes me think that comparisons can only be made between variants.

As a quick workaround I tried changing the comparison to: if (proxy != asiotap::endpoint(asiotap::hostname_endpoint::null())) and got this:

build/release/libs/freelan/src/curl.cpp: In member function ‘void freelan::curl::set_proxy(const endpoint&)’:
build/release/libs/freelan/src/curl.cpp:149:13: error: ambiguous overload for ‘operator!=’ (operand types are ‘const endpoint {aka const boost::variant<asiotap::hostname_endpoint, asiotap::base_ip_endpoint<boost::asio::ip::address_v4>, asiotap::base_ip_endpoint<boost::asio::ip::address_v6> >}’ and ‘asiotap::endpoint {aka boost::variant<asiotap::hostname_endpoint, asiotap::base_ip_endpoint<boost::asio::ip::address_v4>, asiotap::base_ip_endpoint<boost::asio::ip::address_v6> >}’)
   if (proxy != asiotap::endpoint(asiotap::hostname_endpoint::null()))
             ^
In file included from /usr/include/boost/variant.hpp:17:0,
                 from build/release/include/asiotap/types/endpoint.hpp:51,
                 from build/release/libs/freelan/src/curl.hpp:57,
                 from build/release/libs/freelan/src/curl.cpp:46:
/usr/include/boost/variant/variant.hpp:2209:10: note: candidate: void boost::variant<T0, TN>::operator!=(const U&) const [with U = boost::variant<asiotap::hostname_endpoint, asiotap::base_ip_endpoint<boost::asio::ip::address_v4>, asiotap::base_ip_endpoint<boost::asio::ip::address_v6> >; T0_ = asiotap::hostname_endpoint; TN = {asiotap::base_ip_endpoint<boost::asio::ip::address_v4>, asiotap::base_ip_endpoint<boost::asio::ip::address_v6>}]
     void operator!=(const U&) const
          ^
/usr/include/boost/variant/variant.hpp:2264:17: note: candidate: bool boost::variant<T0, TN>::operator!=(const boost::variant<T0, TN>&) const [with T0_ = asiotap::hostname_endpoint; TN = {asiotap::base_ip_endpoint<boost::asio::ip::address_v4>, asiotap::base_ip_endpoint<boost::asio::ip::address_v6>}]
     inline bool operator!=(const variant& rhs) const
                 ^
In file included from build/release/libs/freelan/src/curl.hpp:57:0,
                 from build/release/libs/freelan/src/curl.cpp:46:
build/release/include/asiotap/types/endpoint.hpp:359:14: note: candidate: bool asiotap::operator!=(const endpoint&, const endpoint&)
  inline bool operator!=(const endpoint& lhs, const endpoint& rhs)

Which I think got us closer to selecting the operator we need (see the last two candidates). I'm not sure but I think that the operator used in preventing comparisons with foreign types is still mentioned because one variant is const and the other is not.

Since this used to work maybe the error can be related to the version of boost we're compiling against? I'm compiling against 1.58 and I see that my OpenWRT router also provides version 1.58.

@zoopp
Contributor
zoopp commented Jul 19, 2015

if (!(proxy == asiotap::endpoint(asiotap::hostname_endpoint::null()))) at libs/freelan/src/curl.cpp:149:13 fixes the compilation error described above however I'm not sure if the check does what it was intended to do.

@ereOn
Member
ereOn commented Jul 19, 2015

@zoopp Your change seems equivalent to the original code.

Can you try with:

if (!(proxy == asiotap::hostname_endpoint::null()))

And see if that works too ? I suspect somehow the boost version available to you doesn't define the operator!= overload for variant types for some reason. Could it be it is not as up to date as for the Linux/OSX/Windows version ?

Anyway, if that works, you might even do a pull request (please add a comment as to why this form is needed in the code if you do so). So that I can integrate the compilation fix upstream.

@zoopp
Contributor
zoopp commented Jul 22, 2015

Sorry for the late response. I'll have a look at it tomorrow.

@zoopp
Contributor
zoopp commented Jul 23, 2015

Here are my findings:

  • As you can see in the
    variant operators defined in boost variant, the only comparisons allowed are between variants. I've looked throughout versions 1.45 - 1.58 and did not see anything hinting the possibility of doing comparisons between a variant and variant types using operators;
  • I've managed to eliminate the ambiguous overload error introduced by if (proxy != asiotap::endpoint(asiotap::hostname_endpoint::null())) by removing bool operator!=(const endpoint& lhs, const endpoint& rhs) from libs/asiotap/include/asiotap/types/endpoint.hpp. As it turns out it wasn't used anywhere so its removal did not have any other impact; also, if you look at the variant operator!= you'll notice that it does the same thing as this operator;
  • Reading through the variant documentation I see that a variant will by default, default-construct its first bounded type (which in our case is equivalent with asiotap::hostname_endpoint::null());

To conclude:

  • I'm not sure why it compiled before (I'm saying this because there are 2.0 windows binaries available), judging by the boost variant source-code it shouldn't have;
  • bool operator!=(const endpoint& lhs, const endpoint& rhs) from libs/asiotap/include/asiotap/types/endpoint.hpp introduces overload ambiguity and should be removed since. It's removal won't cause any problems and boost variant's operator!= will substitute for it;
  • Following the removal of the operator mentioned above, we can rewrite the line that introduces the compilation error as if (proxy != asiotap::endpoint()) however I might argue that the more explicit form if (proxy != asiotap::endpoint(asiotap::hostname_endpoint::null())) could be a better choice because it expresses the intent more clearly.

@ereOn what do you think about all this? Should I submit a pull request incorporating these fixes?

@ereOn
Member
ereOn commented Jul 23, 2015

@zoopp Actually, variants should have a implicit one-parameter constructor for each of their variant types, which means they can be implicitely constructed thanks to argument-dependent-lookup when operator!= is called. For this to work obviously, one has to declare the operator in the same namespace as the variant which is why it was implemented in the first place.

That being said, I have absolutely no problem in accepting a PR that fixes the compilation problems you faced and doesn't break anything else. I may have started FreeLAN on my own, but it belongs to the open-source community so any improvement, whether it be on the compilation, packaging or feature side of things, is more than welcome. Feel free to submit your PR and I'll gladly review it.

I will have to make sure it doesn't break on OSX and Linux as well. Thanks for your follow-up on that issue, I appreciate it !

@ereOn ereOn closed this in #85 Aug 1, 2015
@leggewie
Contributor
leggewie commented Aug 2, 2015

#85 is absolutely not the same issue as this one (although #85 might have affected this problem for a while). Unfortunately, freelan fails to build again as of today in OpenWRT, but to build against the latest OpenWRT HEAD and provide a log will take until tomorrow when I have better internet connection. Please unmerge #85 and this ticket @ereOn.

@ereOn
Member
ereOn commented Aug 3, 2015

@leggewie : I'm not sure to understand: Are you saying that this merge caused a compilation issue ?!

I would have thought that with the CI build passing and the conditional statement on the Boost version, this was pretty safe. I'm surprised.

Or are you talking about referencing the other ticket from this one ?

@ereOn ereOn reopened this Aug 3, 2015
@leggewie
Contributor
leggewie commented Aug 4, 2015

I am only referring to the fact that the tickets are not duplicates but deal with totally different issues.

@leggewie
Contributor
leggewie commented Aug 5, 2015
make[2]: Entering directory `/usr/src/wrt/my-feed/net/freelan'
rm -f /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/stamp/.freelan_installed
(cd /media/rolf/DATA/tmp/compile/wrt/git/build_dir/target-mipsel_mips32_musl-1.1.10/freelan-2015-08-01; CC="mipsel-openwrt-linux-musl-gcc" CXX="mipsel-openwrt-linux-musl-g++" CFLAGS="-Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libiconv-stub/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libintl-stub/include -Wno-error=cpp -Wno-error=return-type " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libiconv-stub/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libintl-stub/include -Wno-error=cpp -Wno-error=return-type " CPPFLAGS="-I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/usr/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include/fortify -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libiconv-stub/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libintl-stub/include " LDFLAGS="-L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/lib -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/usr/lib -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/lib -znow -zrelro -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libiconv-stub/lib -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libintl-stub/lib " DESTDIR="/media/rolf/DATA/tmp/compile/wrt/git/build_dir/target-mipsel_mips32_musl-1.1.10/freelan-2015-08-01/ipkg-install" LIBS="iconv" LINKFLAGS="-L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/lib -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/usr/lib -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/lib -znow -zrelro -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libiconv-stub/lib -L/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libintl-stub/lib " FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION="2015-08-01-3177dd8b21540d8c8d8c3472d85ad00ae4bc39d6" scons prefix=/usr "--mode=release" install )
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
mipsel-openwrt-linux-musl-g++ -o build/release/libs/asiotap/src/icmpv6_helper.o -c -Os -pipe -mno-branch-likely -mips32 -mtune=mips32 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libiconv-stub/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libintl-stub/include -Wno-error=cpp -Wno-error=return-type --std=c++11 -Wall -Wextra -Werror -pedantic -Wshadow -O3 -isystem third-party/install/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/usr/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include/fortify -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libiconv-stub/include -I/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/lib/libintl-stub/include -DFREELAN_INSTALL_PREFIX="\"/usr\"" -Ibuild/release/libs/asiotap/include/asiotap -Ibuild/release/include build/release/libs/asiotap/src/icmpv6_helper.cpp
In file included from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/detail/socket_types.hpp:57:0,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/detail/epoll_reactor.hpp:30,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/detail/reactor.hpp:21,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/detail/impl/task_io_service.ipp:24,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/detail/task_io_service.hpp:198,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/impl/io_service.hpp:71,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/io_service.hpp:767,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/basic_io_object.hpp:19,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/basic_socket.hpp:20,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio/basic_datagram_socket.hpp:20,
                 from /media/rolf/DATA/tmp/compile/wrt/git/staging_dir/target-mipsel_mips32_musl-1.1.10/usr/include/boost/asio.hpp:21,
                 from build/release/libs/asiotap/include/asiotap/osi/helper.hpp:48,
                 from build/release/libs/asiotap/include/asiotap/osi/icmpv6_helper.hpp:47,
                 from build/release/libs/asiotap/src/icmpv6_helper.cpp:45:
/media/rolf/DATA/tmp/compile/wrt/git/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
 #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
  ^
build/release/libs/asiotap/src/icmpv6_helper.cpp: In function 'asiotap::osi::icmpv6_ipv6_pseudo_header asiotap::osi::{anonymous}::parent_frame_to_pseudo_header(asiotap::osi::const_helper<asiotap::osi::ipv6_frame>)':
build/release/libs/asiotap/src/icmpv6_helper.cpp:57:46: error: missing initializer for member 'asiotap::osi::icmpv6_ipv6_pseudo_header::ipv6_source' [-Werror=missing-field-initializers]
     icmpv6_ipv6_pseudo_header pseudo_header {};
                                              ^
build/release/libs/asiotap/src/icmpv6_helper.cpp:57:46: error: missing initializer for member 'asiotap::osi::icmpv6_ipv6_pseudo_header::ipv6_destination' [-Werror=missing-field-initializers]
build/release/libs/asiotap/src/icmpv6_helper.cpp:57:46: error: missing initializer for member 'asiotap::osi::icmpv6_ipv6_pseudo_header::upper_layer_length' [-Werror=missing-field-initializers]
build/release/libs/asiotap/src/icmpv6_helper.cpp:57:46: error: missing initializer for member 'asiotap::osi::icmpv6_ipv6_pseudo_header::zero' [-Werror=missing-field-initializers]
build/release/libs/asiotap/src/icmpv6_helper.cpp:57:46: error: missing initializer for member 'asiotap::osi::icmpv6_ipv6_pseudo_header::zero2' [-Werror=missing-field-initializers]
build/release/libs/asiotap/src/icmpv6_helper.cpp:57:46: error: missing initializer for member 'asiotap::osi::icmpv6_ipv6_pseudo_header::ipv6_next_header' [-Werror=missing-field-initializers]
cc1plus: all warnings being treated as errors
scons: *** [build/release/libs/asiotap/src/icmpv6_helper.o] Error 1
scons: building terminated because of errors.
make[2]: *** [/media/rolf/DATA/tmp/compile/wrt/git/build_dir/target-mipsel_mips32_musl-1.1.10/freelan-2015-08-01/.configured_yyynnnnnnnn] Error 2
make[2]: Leaving directory `/usr/src/wrt/my-feed/net/freelan'
make[1]: *** [package/feeds/Rolf/freelan/compile] Error 2
make[1]: Leaving directory `/media/rolf/DATA/tmp/compile/wrt/git'
make: *** [package/freelan/compile] Error 2

This is the error I get now. As of today compilation for OpenWRT is again broken against the latest freelan HEAD.

@ereOn
Member
ereOn commented Aug 5, 2015

@leggewie This is a bug in g++. Can you add -Wno-missing-field-initializer to the CXXFLAGS ?

This should be done already by the scons script when g++ is detected so i suppose the detection doesn't work in your case for some reason.

Also regarding the merging of those tickets, I can't seem to tell github to unmerge those, but I don't think it is a big deal. It is more a reference than a strong link anyway. The closing of the ticket wasn't intended in the first place.

@leggewie
Contributor

I added lines 51 and 52 to http://paste.debian.net/290831/ yet it didn't seem to have any discernible effect. I don't think the CXXFLAGS were actually changed. Do you have an idea?

@ereOn
Member
ereOn commented Aug 10, 2015

I'm not sure those go through SCons properly.

Can you try adding those in the SCONS_VARS instead ? As CXXFLAGS.

@leggewie
Contributor
SCONS_VARS += CXXFLAGS="$$$$CXXFLAGS -Wno-missing-field-initializer"

indeed seems to do it.

@ereOn
Member
ereOn commented Aug 11, 2015

@leggewie Glad it solves the problem !

Does it mean the task can be closed or do you have other issues ?

@leggewie
Contributor

Yes, let's close the task. Thank you

@leggewie leggewie closed this Aug 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment