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

cross compile support #120

Open
liamstask opened this issue Jun 15, 2020 · 2 comments
Open

cross compile support #120

liamstask opened this issue Jun 15, 2020 · 2 comments

Comments

@liamstask
Copy link

Hi - I was attempting to cross compile (via buildroot) colm as a dependency for ragel, itself a dependency of another project, and ran into the following error during configure:

checking for ./DIST... configure: error: cannot check for file existence when cross compiling

in the meantime, i'm just patching this locally to avoid this specific check in order to determine whether to build the manual, but would be nice to support this.

configure env details:

PATH="host/bin:host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" AR="host/bin/x86_64-buildroot-linux-gnu-ar" AS="host/bin/x86_64-buildroot-linux-gnu-as" LD="host/bin/x86_64-buildroot-linux-gnu-ld" NM="host/bin/x86_64-buildroot-linux-gnu-nm" CC="host/bin/x86_64-buildroot-linux-gnu-gcc" GCC="host/bin/x86_64-buildroot-linux-gnu-gcc" CPP="host/bin/x86_64-buildroot-linux-gnu-cpp" CXX="host/bin/x86_64-buildroot-linux-gnu-g++" FC="host/bin/x86_64-buildroot-linux-gnu-gfortran" F77="host/bin/x86_64-buildroot-linux-gnu-gfortran" RANLIB="host/bin/x86_64-buildroot-linux-gnu-ranlib" READELF="host/bin/x86_64-buildroot-linux-gnu-readelf" STRIP="host/bin/x86_64-buildroot-linux-gnu-strip" OBJCOPY="host/bin/x86_64-buildroot-linux-gnu-objcopy" OBJDUMP="host/bin/x86_64-buildroot-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="host/bin/ccache /usr/bin/gcc" GCC_FOR_BUILD="host/bin/ccache /usr/bin/gcc" CXX_FOR_BUILD="host/bin/ccache /usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-Ihost/include" CFLAGS_FOR_BUILD="-O2 -Ihost/include" CXXFLAGS_FOR_BUILD="-O2 -Ihost/include" LDFLAGS_FOR_BUILD="-Lhost/lib -Wl,-rpath,host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="host/bin/x86_64-buildroot-linux-gnu-as" DEFAULT_LINKER="host/bin/x86_64-buildroot-linux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  " LDFLAGS="" FCFLAGS=" -Os " FFLAGS=" -Os " PKG_CONFIG="host/bin/pkg-config" STAGING_DIR="host/x86_64-buildroot-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl ac_cv_lbl_unaligned_fail=no ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_memcmp_working=yes ac_cv_have_decl_malloc=yes gl_cv_func_malloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ac_cv_func_calloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes lt_cv_sys_lib_search_path_spec="" ac_cv_c_bigendian=no   CONFIG_SITE=/dev/null ./configure --target=x86_64-buildroot-linux-gnu --host=x86_64-buildroot-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix="" --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-dependency-tracking --enable-ipv6 --disable-nls --disable-static --enable-shared  --disable-manual
@adrian-thurston
Copy link
Owner

Thanks @liamstask. That was always a bit of a poor attempt at determining if we are configuring from a distribution tarball or directly from source code control. There is probably a better way.

@Grommish
Copy link
Contributor

Grommish commented Dec 24, 2020

I created a PR to correct this.
#124

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

No branches or pull requests

3 participants