Skip to content

Conversation

@tpetazzoni
Copy link
Contributor

…-compilation

The thrift build system currently assumes that the thrift compiler is
always available in $(top_builddir)/compiler/cpp/thrift. However, in a
cross-compilation context, this location contains the thrift compiler
built for the target... which obviously will not run on the build
machine.

In order to support such cross-compilation situation, we introduce the
THRIFT variable as a an argument for the configure script (using
AC_ARG_VAR). If not specified, it defaults to the existing value of
using compiler/cpp/thrift from the build directory, but it can be
overridden when calling ./configure.

Note that $(top_builddir) cannot be used within the configure script,
so we simply use pwd, which is the same as the top_builddir.

Signed-off-by: Thomas Petazzoni thomas.petazzoni@free-electrons.com

…-compilation

The thrift build system currently assumes that the thrift compiler is
always available in $(top_builddir)/compiler/cpp/thrift. However, in a
cross-compilation context, this location contains the thrift compiler
built for the target... which obviously will not run on the build
machine.

In order to support such cross-compilation situation, we introduce the
THRIFT variable as a an argument for the configure script (using
AC_ARG_VAR). If not specified, it defaults to the existing value of
using compiler/cpp/thrift from the build directory, but it can be
overridden when calling ./configure.

Note that $(top_builddir) cannot be used within the configure script,
so we simply use `pwd`, which is the same as the top_builddir.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
@jeking3
Copy link
Contributor

jeking3 commented Sep 5, 2017

Wouldn't we want the value in configure.ac to percolate through? Why override it in every Makefile.am?

@tpetazzoni
Copy link
Contributor Author

Well, my patch precisely removes the override in every Makefile.am, so I'm not sure to understand your question.

@jeking3
Copy link
Contributor

jeking3 commented Sep 5, 2017

Thanks, it was late when I posted the comment and I misread the change! If there's any way you could rebase on master, squash, and force push that will kick off another CI build to validate the fix.

@jeking3
Copy link
Contributor

jeking3 commented Sep 6, 2017

I like the changes as proposed; this needs an Apache Jira ticket stating the problem and resolution in order to get merged.

https://thrift.apache.org/docs/HowToContribute

Thanks!

@jeking3
Copy link
Contributor

jeking3 commented Sep 9, 2017

I opened THRIFT-4325 for this.

@asfgit asfgit closed this in 1744cdc Sep 9, 2017
jeking3 pushed a commit to jeking3/thrift that referenced this pull request Nov 30, 2017
…-compilation

The thrift build system currently assumes that the thrift compiler is
always available in $(top_builddir)/compiler/cpp/thrift. However, in a
cross-compilation context, this location contains the thrift compiler
built for the target... which obviously will not run on the build
machine.

In order to support such cross-compilation situation, we introduce the
THRIFT variable as a an argument for the configure script (using
AC_ARG_VAR). If not specified, it defaults to the existing value of
using compiler/cpp/thrift from the build directory, but it can be
overridden when calling ./configure.

Note that $(top_builddir) cannot be used within the configure script,
so we simply use `pwd`, which is the same as the top_builddir.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This closes apache#1336
This closes apache#1350
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