You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/05/05 20:16:54 UTC
[GitHub] [trafficserver] randall opened a new pull request #7786: Enables crosscompling of ATS
randall opened a new pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786
These changes allow for CompileParseRules to be built and run on host
architecture along with cleaning up automake macros that previously
prevented crosscompliation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-836130066
[approve ci autest]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall removed a comment on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall removed a comment on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-833642696
TODO: Fix out of tree compilation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bryancall commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
bryancall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-868702474
I will take a look at this again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall edited a comment on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall edited a comment on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-832981167
my testing consisted of cross-compiling on x86_64 macOS targeting arm64.
The environment vars I set along with the host value in testing:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
CPPFLAGS="-target arm64-apple-macos -I/opt/arm64/include"; export CPPFLAGS
LDFLAGS="-target arm64-apple-macos -L/opt/arm64/lib"; export LDFLAGS
AM_LDFLAGS="-Xcompiler -target -Xcompiler arm64-apple-macos"; export AM_LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--host=x86_64-apple-darwin
```
(I'm not saying those are required, I just tested with those).
This might've addressed some of the issues described in #7754
To test targeting arm64 macOS on x86_64 host, you'll need to build OpenSSL and PCRE (at minimum). I installed my dependencies under `/opt/arm64`
For PCRE:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CPPFLAGS='-target arm64-apple-macos'; export CPPFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
LDFLAGS='-target arm64-apple-macos'; export LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--prefix=/opt/arm64 \
--host=x86_64-apple-darwin \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-cpp \
--enable-shared=no
make && make install
```
For OpenSSL:
```
./Configure --prefix=/opt/arm64 darwin64-arm64-cc
make && make install
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall removed a comment on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall removed a comment on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-836130066
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall edited a comment on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall edited a comment on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-832981167
my testing consisted of cross-compiling on x86_64 macOS targeting arm64.
The environment vars I set along with the host value in testing:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
CPPFLAGS="-target arm64-apple-macos -I/opt/arm64/include"; export CPPFLAGS
LDFLAGS="-target arm64-apple-macos -L/opt/arm64/lib"; export LDFLAGS
AM_LDFLAGS="-Xcompiler -target -Xcompiler arm64-apple-macos"; export AM_LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--host=x86_64-apple-darwin \
--with-openssl=/opt/arm64 \
--with-pcre=/opt/arm64
```
(I'm not saying those are required, I just tested with those).
This might've addressed some of the issues described in #7754
To test targeting arm64 macOS on x86_64 host, you'll need to build OpenSSL and PCRE (at minimum). I installed my dependencies under `/opt/arm64`
For PCRE:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CPPFLAGS='-target arm64-apple-macos'; export CPPFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
LDFLAGS='-target arm64-apple-macos'; export LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--prefix=/opt/arm64 \
--host=x86_64-apple-darwin \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-cpp \
--enable-shared=no
make && make install
```
For OpenSSL:
```
./Configure --prefix=/opt/arm64 darwin64-arm64-cc
make && make install
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] zwoop commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-1048070589
Cherry-picked to v9.2.x
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on a change in pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall commented on a change in pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#discussion_r676931991
##########
File path: build/ax_cc_for_build.m4
##########
@@ -0,0 +1,76 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CC_FOR_BUILD
+#
+# DESCRIPTION
+#
+# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD.
+#
+# LICENSE
+#
+# Copyright (c) 2010 Reuben Thomas <rr...@sc3d.org>
+# Copyright (c) 1999 Richard Henderson <rt...@redhat.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 3
+
+dnl Get a default for CC_FOR_BUILD to put into Makefile.
+AC_DEFUN([AX_CC_FOR_BUILD],
+[# Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+ CC_FOR_BUILD='$(CC)'
+ CXX_FOR_BUILD='$(CXX)'
+fi
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CXX_FOR_BUILD)
+
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+else
+ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
+ [rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+AC_SUBST(EXEEXT_FOR_BUILD)])dnl
Review comment:
That's what's in the upstream repo.
http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cc_for_build.m4
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-835971218
[approve ci autest]
[approve ci clang-analyzer]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-883061669
[approve ci clang-analyzer]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] SolidWallOfCode commented on a change in pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on a change in pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#discussion_r676900001
##########
File path: build/ax_cc_for_build.m4
##########
@@ -0,0 +1,76 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CC_FOR_BUILD
+#
+# DESCRIPTION
+#
+# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD.
+#
+# LICENSE
+#
+# Copyright (c) 2010 Reuben Thomas <rr...@sc3d.org>
+# Copyright (c) 1999 Richard Henderson <rt...@redhat.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 3
+
+dnl Get a default for CC_FOR_BUILD to put into Makefile.
+AC_DEFUN([AX_CC_FOR_BUILD],
+[# Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+ CC_FOR_BUILD='$(CC)'
+ CXX_FOR_BUILD='$(CXX)'
+fi
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CXX_FOR_BUILD)
+
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+else
+ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
+ [rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+AC_SUBST(EXEEXT_FOR_BUILD)])dnl
Review comment:
Any reason for the trailing "dnl"?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall edited a comment on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall edited a comment on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-832981167
my testing consisted of cross-compiling on x86_64 macOS targeting arm64.
The environment vars I set along with the host value in testing:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
CPPFLAGS="-target arm64-apple-macos -I/opt/arm64/include"; export CPPFLAGS
LDFLAGS="-target arm64-apple-macos -L/opt/arm64/lib"; export LDFLAGS
AM_LDFLAGS="-Xcompiler -target -Xcompiler arm64-apple-macos"; export AM_LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--host=x86_64-apple-darwin \
--with-openssl=/opt/arm64 \
--with-pcre=/opt/arm64
```
(I'm not saying those are required, I just tested with those).
This might've addressed some of the issues described in #7754
To test targeting arm64 macOS on x86_64 host, you'll need to build OpenSSL and PCRE (at minimum). I installed my dependencies under `/opt/arm64`
For PCRE:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CPPFLAGS='-target arm64-apple-macos'; export CPPFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
LDFLAGS='-target arm64-apple-macos'; export LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--prefix=/opt/arm64 \
--host=x86_64-apple-darwin \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-cpp \
--enable-shared=no
make && make install
```
For OpenSSL:
```
./Configure --prefix=/opt/arm64 darwin64-arm64-cc
make && make install
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-833642696
TODO: Fix out of tree compilation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall edited a comment on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall edited a comment on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-832981167
my testing consisted of cross-compiling on x86_64 macOS targeting arm64.
To test targeting arm64 macOS on x86_64 host, you'll need to build OpenSSL and PCRE (at minimum). I installed my dependencies under `/opt/arm64`
For PCRE:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CPPFLAGS='-target arm64-apple-macos'; export CPPFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
LDFLAGS='-target arm64-apple-macos'; export LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--prefix=/opt/arm64 \
--host=x86_64-apple-darwin \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-cpp \
--enable-shared=no
make && make install
```
For OpenSSL:
```
./Configure --prefix=/opt/arm64 darwin64-arm64-cc
make && make install
```
The environment vars I set along with the host value in testing:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
CPPFLAGS="-target arm64-apple-macos -I/opt/arm64/include"; export CPPFLAGS
LDFLAGS="-target arm64-apple-macos -L/opt/arm64/lib"; export LDFLAGS
AM_LDFLAGS="-Xcompiler -target -Xcompiler arm64-apple-macos"; export AM_LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--host=x86_64-apple-darwin \
--with-openssl=/opt/arm64 \
--with-pcre=/opt/arm64
```
(I'm not saying those are required, I just tested with those).
This might've addressed some of the issues described in #7754
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-883061669
[approve ci clang-analyzer]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bryancall commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
bryancall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-842675553
I am getting this error when running configure:
```
configure:7756: checking whether the C compiler works
configure:7778: clang -target arm64-apple-macos -target arm64-apple-macos -I/opt/arm64/include -target arm64-apple-macos -L/opt/arm64/lib conftest.c >&5
ld: warning: directory not found for option '-L/opt/arm64/lib'
ld: warning: ignoring file /Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.osx.a, missing required architecture arm64 in file /Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.osx.a (3 slices)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture arm64 in file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:7782: $? = 1
configure:7822: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Apache Traffic Server"
| #define PACKAGE_TARNAME "trafficserver"
| #define PACKAGE_VERSION "10.0.0"
| #define PACKAGE_STRING "Apache Traffic Server 10.0.0"
| #define PACKAGE_BUGREPORT "dev@trafficserver.apache.org"
| #define PACKAGE_URL "https://trafficserver.apache.org"
| #define PACKAGE "trafficserver"
| #define VERSION "10.0.0"
| #define HAS_CURL 1
| /* end confdefs.h. */
|
| int
| main (void)
| {
|
| ;
| return 0;
| }
configure:7827: error: in `/Users/bcall/dev/apache/trafficserver/build-Darwin':
configure:7829: error: C compiler cannot create executables
See `config.log' for more details
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-883061669
[approve ci clang-analyzer]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall removed a comment on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall removed a comment on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-883061669
[approve ci clang-analyzer]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on pull request #7786: Enables crosscompling of ATS
Posted by GitBox <gi...@apache.org>.
randall commented on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-832981167
my testing consisted of cross-compiling on x86_64 macOS targeting arm64.
The environment vars I set along with the host value in testing:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
CPPFLAGS="-target arm64-apple-macos -I/opt/arm64/include"; export CPPFLAGS
LDFLAGS="-target arm64-apple-macos -L/opt/arm64/lib"; export LDFLAGS
AM_LDFLAGS="-Xcompiler -target -Xcompiler arm64-apple-macos"; export AM_LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--host=x86_64-apple-darwin
```
(I'm not saying those are required, I just tested with those).
This might've addressed some of the issues described in #7754
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall edited a comment on pull request #7786: Enables cross-compiling
Posted by GitBox <gi...@apache.org>.
randall edited a comment on pull request #7786:
URL: https://github.com/apache/trafficserver/pull/7786#issuecomment-832981167
my testing consisted of cross-compiling on x86_64 macOS targeting arm64.
The environment vars I set along with the host value in testing:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
CPPFLAGS="-target arm64-apple-macos -I/opt/arm64/include"; export CPPFLAGS
LDFLAGS="-target arm64-apple-macos -L/opt/arm64/lib"; export LDFLAGS
AM_LDFLAGS="-Xcompiler -target -Xcompiler arm64-apple-macos"; export AM_LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--host=x86_64-apple-darwin \
--with-openssl=/opt/arm64 \
--with-pcre=/opt/arm64
```
(I'm not saying those are required, I just tested with those).
This might've addressed some of the issues described in #7754
To test targeting arm64 macOS on x86_64 host, you'll need to build OpenSSL and PCRE (at minimum). I installed my dependencies under `/opt/arm64`
For PCRE:
```
CFLAGS='-target arm64-apple-macos'; export CFLAGS
CPPFLAGS='-target arm64-apple-macos'; export CPPFLAGS
CXXFLAGS='-target arm64-apple-macos'; export CXXFLAGS
LDFLAGS='-target arm64-apple-macos'; export LDFLAGS
CC=clang; export CC
CXX=clang++; export CXX
./configure \
--prefix=/opt/arm64 \
--host=x86_64-apple-darwin \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-cpp \
--enable-shared=no
make && make install
```
For OpenSSL:
```
./Configure --prefix=/opt/arm64 darwin64-arm64-cc
make && make install
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org