Archiconda / build-tools

necessary build tools for the archiconda distribution
BSD 2-Clause "Simplified" License
284 stars 50 forks source link

Why can't the compiler create executables #3

Open hmaarrfk opened 5 years ago

hmaarrfk commented 5 years ago

@jjhelmus Thanks for all your help bootstrapping.

Do you know why I'm unable to create executables with the compilers you provided:

checking whether the C compiler works... no
configure: error: in `/root/archiconda3/conda-bld/make_1546046933373/work':
configure: error: C compiler cannot create executables
See `config.log' for more details

https://app.shippable.com/github/Archiconda/make-make-feedstock/runs/1/1/console

I had to rename the repository make-make-feedstock because I deleted it by accident and shippable freaked out that a new repo was created with the same "old name" as before.

jjhelmus commented 5 years ago

My guess is that the failure is caused by the older glibc version in the container. The compilers in the boostrap channel require glibc 2.27 (Ubuntu 18.04) but the container provides glib 2.23 (Ubuntu 16.04). If you can figure out how to dump the config.log file the error message should provide additional details.

hmaarrfk commented 5 years ago

is that it...... man i must have read 16.04 accidentally.......

jjhelmus commented 5 years ago

I might have claimed the compilers were built on Ubunutu 16.04 at some point. I was on vacation the second half of December and did not have access to my aarch64 development box so wasn't certain on what I had installed. I checked today and can confirm that is was Ubuntu 18.04 not 16.04.

hmaarrfk commented 5 years ago

also, why can't raspbian update to aarch64 already.....

man this is dumb, make needs make to compile...

https://app.shippable.com/github/Archiconda/make-make-feedstock/runs/3/1/console

hmaarrfk commented 5 years ago

(but yes, you are right, the compilers you mentioned do need 18.04)

jjhelmus commented 5 years ago

Raspbian is compatible with all Raspberry Pi models so it cannot change to aarch64 as the Raspberry Pi 1 and the Zero are armv6l CPUs.

hmaarrfk commented 5 years ago

I totally understand that, but it is real shame since this kinda means we would have to support two architechtures....

i'm not sure shippable gives you real aarch32, but maybe just an image that starts up as 32 bit OS. this was causing problems with CPU detection AFAIK

hmaarrfk commented 5 years ago

Nice, well the shippable ci is now mostly confirmed working.

this was uploaded!!!! https://anaconda.org/archiarm/make

jjhelmus commented 5 years ago

There are a lot of armv7 boards available besides the Raspberry Pi that would benefit from aarch32 packages. Most Linux distributions support two different ARM platforms, aarch64 and armhf. armhf is for 32-bit armv7l machines with hardware floating point.

conda determines the platform from platform.machine which I believe will match the output of the uname -p command. My guess is that shippable's aarch32 platform is running on 64-bit hardware so uname -p probably is reporting aarch64. There are some methods to modify the architecture reported by uname (e.g. on x86 the linux32 command). Setting the environment variable CONDA_SUBDIR=linux-armv7l may be sufficient for the case here.

jjhelmus commented 5 years ago

Nice, well the shippable ci is now mostly confirmed working.

Neat!

hmaarrfk commented 5 years ago

got it. well i'll wait for your compilers now. even if it is just for 64 bit.

I don't really know how you bootstrapped things, but Archiconda 0.1.1 was able to run on ubuntu 16.04, so if you want, we can use the scripts here to recompile everything with the compiler you are working on.

hmaarrfk commented 5 years ago

Man, I'm really sorry for bothering you so many times, but centos7 also can't build executables:

I'm running this with qemu-static-aarch64 on my intel machine locally.

This is using the compilers from: https://anaconda.org/c4aarch64/

hmaarrfk commented 5 years ago

I think it is because some scripts assume that HOST and BUILD should be the same, or very similar, or very dissimily. Not almost the same

flex was a problematic case for me https://github.com/Archiconda/flex-feedstock/blob/aarch64/recipe/build.sh#L22

hmaarrfk commented 5 years ago

I think the compilers in c4aarch64 are tuned to work much better than the ones in bootstrap.

I'm going to have to figure out channel priorities to create a new installer that sets up c4aarch64 and archiarm as higher priority channels

jjhelmus commented 5 years ago

I think it is because some scripts assume that HOST and BUILD should be the same, or very similar, or very dissimily. Not almost the same

Yes BUILD needs to be set explicitly in conda_build_config.yaml to "aarch64-conda_cos7-linux-gnu". If this if not done conda build will set the BUILD variable to aarch64-conda_cos6-linux-gnu. I added the conda_build_config.yaml file I've been using to the conda4aarch64 repository.

hmaarrfk commented 5 years ago

Yeah, I started to create a default .ci_setup file that introduced much of that. I guess there is no way around this.

https://github.com/Archiconda/conda-smithy/commit/a5d290b93e5fac234901114bd780225baa0d0aee I'll have to add a few more of the parameters you have listed in there, but I think for the most part that was the most important one.

I guess you aren't working much with the conda-forge infrastrucutre.

Is there a config file we should change in the installer to make this the default?

jjhelmus commented 5 years ago

Is there a config file we should change in the installer to make this the default?

I do not think the installer can set this but the default should be changed in conda-build.