-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libtorrent 1.2 + boost 1.70 or libtorrent 2.0 + boost 1.78 #5202
Conversation
295c9d4
to
5f521e2
Compare
mk/spksrc.common.mk
Outdated
# GCC version | ||
version_gcc = $(shell $$(sed -n -e '/TC_ENV += TC_GCC/ s/.*= *//p' $(PWD)/$(subst arch,work,$(MAKECMDGOALS))/tc_vars.mk)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hgy59 I'd like to bring your attention to this function helper so we can finally make usage of the GCC version from any spk. See use-case in python310 Makefile which allows to capture comcerto2k-7.0
exception cleanly.
Comments welcomed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My findings so far:
- you don't have
TC_ENV
norTC_GCC
available before the target$(TC_VARS_MK)
is built. - you can modify makefile variables in a custom
PRE_DEPEND_TARGET
that depends on$(TC_VARS_MK)
with $(eval )
.PHONY: python310_pre_depend
python310_pre_depend: $(TC_VARS_MK)
@$(MSG) "Evaluate dependencies for GCC version $(TC_GCC)"
$(eval WHEELS_BUILD_ARGS += $(shell if "$(TC_GCC)" != "5.0" && printf '%s\n' "$(TC_GCC)" "5.0" | sort -VC ; then echo --b2-args=cxxstd=11 ; fi))
@$(MSG) "WHEELS_BUILD_ARGS=$(WHEELS_BUILD_ARGS)"
- ensure the
$(TC_VARS_MK)
is built before - version comparision migth be improved (but
version_lt
is not ment for shell environment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your findings where pretty much the route I was originally leaning towards but the relatively simplistic method I've moved to uses the TC_GCC
version variable from the tc_vars.mk
and works quite well.
It actually solves a long-standing issue I had with:
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
# fix compilation with newer compilers
ADDITIONAL_CXXFLAGS += -D_GLIBCXX_USE_C99_MATH -D_GLIBCXX_HAVE_OBSOLETE_ISNAN -D_GLIBCXX_HAVE_OBSOLETE_ISINF
endif
That can then be converted into (and takes into consideration comcerto2k-7.0
):
ifeq ($(call version_ge, $(call version_gcc), 7.5),1)
# fix compilation with newer compilers
ADDITIONAL_CXXFLAGS += -D_GLIBCXX_USE_C99_MATH -D_GLIBCXX_HAVE_OBSOLETE_ISNAN -D_GLIBCXX_HAVE_OBSOLETE_ISINF
endif
@hgy59 I think I'm up to a working solution using I may even be inches away from a success with Next would be to move the code out from |
@th0ma7 we probably sould first merge this for libtorrent 1.2 to create packages for DSM 6 and DSM 7? |
@hgy59 it's exacltly where I was heading this morning. I was planning to clean-up slightly the code and re-comment python310 test/demo of |
@hgy59 if you're OK with the proposed changes I'd move ahead and merge. I already have changes pending for @Strangelovian PR to re-adjust accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if version _gcc really works, we should introduce REQUIRED_MIN_GCC some time.
So far it looks good to me for merging.
That's an awesome idea :) |
Description
Demonstrate feasibility to build build libtorrent using crossenv, part 2. The following uses only supported version:
libtorrent
2.0.5 (usingboost
1.78) - DSM7 exceptcomcerto2k-7.0
libtorrent
1.2.16 (usingboost
1.70) - DSM6 + DSM7rencode
1.0.7 (from a fork of the project as no-longer maintained)deluge
2.0.5Follows-up #5180
Parallel work to #4153
libtorrent
bug with DSM6/comcerto2k-7.0 using gcc-4.9.x compiler: arvidn/libtorrent#6868Checklist
all-supported
completed successfullyType of change