Summary: | net-libs/libnet-1.0.2-r3 breaks for ARM due to missing -DLIBNET_LIL_ENDIAN | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Christopher Friedt <chrisfriedt> |
Component: | [OLD] Library | Assignee: | Gentoo Netmon project <netmon> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arm |
Priority: | High | Keywords: | Inclusion |
Version: | unspecified | ||
Hardware: | ARM | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=444242 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
libnet-1.0.2a-fix-endianness.patch
patch for libnet.h patch for ebuild |
Description
Christopher Friedt
2009-06-29 22:41:12 UTC
Created attachment 196124 [details, diff]
libnet-1.0.2a-fix-endianness.patch
patch against libnet-1.0.2a-r3.ebuild - simple fix - I suggest bumping the revision
Why do you use old library net-libs/libnet-1.0.2-r3 instead of newer libnet-1.1.2.1-r1.ebuild which does this detection at configure time? I was going to drop libnet-1.0.2a-r3.ebuild from the tree... (In reply to comment #2) > Why do you use old library net-libs/libnet-1.0.2-r3 instead of newer > libnet-1.1.2.1-r1.ebuild which does this detection at configure time? I was > going to drop libnet-1.0.2a-r3.ebuild from the tree... net-analyzer/snort depends on it. arm@ can review the patch. It could (should) be shortened somewhat to perhaps: if [ "$(tc-endian)x" = "${little}x" ]; then append-flags "-DLIBNET_LIL_ENDIAN" else append-flags "-DLIBNET_BIG_ENDIAN" fi Oh and I think this was the intention. Sorry for the bug spam. (In reply to comment #4) > arm@ can review the patch. It could (should) be shortened somewhat to perhaps: > > if > [ "$(tc-endian)x" = "${little}x" ]; then > append-flags "-DLIBNET_LIL_ENDIAN" > else > append-flags "-DLIBNET_BIG_ENDIAN" > fi > Looks okay to me This should be fixed in libnet-1.1.4. Arm, please, retest. And I just missed, that it is keyworded on arm. So nothing should be done here. net-libs/libnet-1.0* is still in the tree because many packages will not work with net-libs/libnet-1.1*, so reopening. (In reply to comment #6) > (In reply to comment #4) > > arm@ can review the patch. It could (should) be shortened somewhat to perhaps: > > > > if > > [ "$(tc-endian)x" = "${little}x" ]; then > > append-flags "-DLIBNET_LIL_ENDIAN" > > else > > append-flags "-DLIBNET_BIG_ENDIAN" > > fi > > > > Looks okay to me Great, could you then apply that and keyword for arm, please? Christopher, is this really needed? I can compile it without issues natively... (In reply to comment #11) > Christopher, is this really needed? I can compile it without issues natively... > My target was an ep93xx system with very very few resources in terms of memory, so in that sense, I would must rather cross-compile most packages for this system. Compiling natively is occasionally not really a valid option. Personally I'd rather see the logic in the source code vs the ebuild. This helps if you have to cd into the dir and do anything manually. #include <endian.h> #if __BYTE_ORDER == __LITTLE_ENDIAN #define LIBNET_LIL_ENDIAN 1 #endif #if __BYTE_ORDER == __BIG_ENDIAN #define LIBNET_BIG_ENDIAN 1 #endif Good call... +1 for this. (In reply to comment #13) > Personally I'd rather see the logic in the source code vs the ebuild. > This helps if you have to cd into the dir and do anything manually. > > #include <endian.h> > > #if __BYTE_ORDER == __LITTLE_ENDIAN > #define LIBNET_LIL_ENDIAN 1 > #endif > > #if __BYTE_ORDER == __BIG_ENDIAN > #define LIBNET_BIG_ENDIAN 1 > #endif > Could a patch be prepared for this, please? Created attachment 255019 [details, diff]
patch for libnet.h
Created attachment 255021 [details, diff]
patch for ebuild
Applied in -r4. Thanks for reporting and for the patch. |