Skip to content
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

Re mk cross build2 #63

Merged
merged 5 commits into from
Dec 27, 2020
Merged

Re mk cross build2 #63

merged 5 commits into from
Dec 27, 2020

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Dec 23, 2020

Allows a cross compilation build by only setting SYSROOT.

Set LIBRE_SO by means of LIBRE_PATH in lib, which is a more common location.
@cspiel1 cspiel1 marked this pull request as draft December 23, 2020 10:39
@cspiel1 cspiel1 force-pushed the re_mk_cross_build2 branch 4 times, most recently from 3a83244 to 93cf8d2 Compare December 23, 2020 12:16
Setting SYSROOT should be enough to set all paths for libre resulting in
correct CFLAGS and LFLAGS. We do this only if SYSROOT is not the default path
"/usr".
@cspiel1 cspiel1 force-pushed the re_mk_cross_build2 branch 2 times, most recently from aef9277 to 388cd36 Compare December 23, 2020 12:23
@cspiel1 cspiel1 marked this pull request as ready for review December 23, 2020 12:23
mk/re.mk Outdated
LIBRE_PATH := $(shell [ -f $(SYSROOT)/include/re/re.h ] && \
echo "$(SYSROOT)")
endif

Copy link
Member

@sreimers sreimers Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should guarantee the prioritised order for relative ../re path search,
Like this (untested):

ifeq ($(LIBRE_PATH),)
LIBRE_PATH := $(shell [ -d ../re ] && echo "../re")
endif

ifeq ($(LIBRE_PATH),)
ifneq ($(SYSROOT),/usr)
LIBRE_PATH := $(shell [ -f $(SYSROOT)/include/re/re.h ] && \
	echo "$(SYSROOT)")
endif
endif

Copy link
Member

@sreimers sreimers Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the new order we should document above:

  • relative path (../re)
  • custom sysroot
  • local installation (/usr/local)
  • system installation (/usr)

The new prio order for re dir is:
- relative path (../re)
- custom SYSROOT
- local installation (/usr/local)
- system installation (/usr)
@cspiel1
Copy link
Collaborator Author

cspiel1 commented Dec 23, 2020

@sreimers The prio order for re makes sense.
But I don't know why the retest failed for macOS. And I don't understand this build command:

cd retest && make STATIC=1 LIBRE_SO=../re && ./retest -r

STATIC is not used in retest.

@sreimers
Copy link
Member

The build is error is unrelated. It looks like a race condition since the jbuf changes (occurs sometimes):

testjbuf: TEST_ERR: src/jbuf.c:234: (No such file or directory)
test: test_jbuf_adaptive: test failed (No such file or directory)

I had no time to investigate.

STATIC is not used in retest.

Good point, i will remove.

@sreimers sreimers merged commit 279aa8a into baresip:master Dec 27, 2020
@cspiel1 cspiel1 deleted the re_mk_cross_build2 branch February 18, 2021 10:14
@sreimers sreimers added this to the v2.0.0 milestone Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants