SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.03k stars 1.23k forks source link

libcap2 is broken (link). Does not compile anymore. #2074

Closed vkostas closed 8 years ago

vkostas commented 8 years ago

libcap2 distribution link http://ftp.sunet.se/pub/Linux/kernel.org/linux/libs/security/linux-privs/libcap2/libcap-2.22.tar.gz is broken. I tried two other sources:

without success:

I tried even the latest version 2.24 without success. Anyone could help?

Dr-Bean commented 8 years ago

Please be specific when describing your issue. Changing the download site shouldn't be a problem of course ;) Provide which architectures fail (toolchain+version), and provide the associated build output (one example per) If the issue occurs with legacy toolchains (anything other than 5.2), then fixing it has no/very low prio.

vkostas commented 8 years ago

I tried all 5.2 archs. Something related to compiler I think.

Arch-5.2 Result
88f6281 OK
alpine cc: error: unrecognized command line option ‘-mfloat-abi=hard’
armada370 cc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
armada375 OK
armadaxp cc: error: unrecognized command line option ‘-mfpu=vfpv3-d16’
avoton OK
bromolow OK
cedarview OK
comcerto2k OK
evansport cc: error: unrecognized command line option ‘-mfpu=vfpv3-d16’
monaco cc: error: unrecognized command line option ‘-mfpu=neon’
ppc853x error: unrecognized command line option ‘-mfloat-gprs=double’
qoriq OK
x64 OK
x86 OK

I only updated PKG_DIST_NAME and PKG_DIST_SITE in Makefile. -PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) -PKG_DIST_SITE = http://ftp.sunet.se/pub/Linux/kernel.org/linux/libs/security/linux-privs/libcap2 +PKG_DIST_NAME = $(PKGNAME)2$(PKG_VERS).orig.$(PKG_EXT) +PKG_DIST_SITE = http://ftp.de.debian.org/debian/pool/main/libc/$(PKG_NAME)2

Dr-Bean commented 8 years ago

Maybe it would look better by changing $(PKG_NAME) to libcap2. PKG_DIST_SITE and -NAME would look a bit better. PKG_DIR would need a change to libcap then, probably. See how it looks ;)

As for the error, the issue is related to the way libcap is compiled. It passes the TC_CFLAGS etc on, as it should, but unrecognized arguments aren't handled by libcap. We can't remove those arguments, because they are needed for compiling other software.

You'll need to test if it works as expected, but try and drop BUILD_CFLAGS from ENV in the spk/Makefile. I have not tested if it actually works, but it should fix the compile errors. That's one way anyway, the other would be to adjust the patch itself to do generally the same thing.

Dr-Bean commented 8 years ago

Closing. I hope my info helped a bit, but otherwise, let us know.