cross icon indicating copy to clipboard operation
cross copied to clipboard

docker: Add gfortran support

Open Dirreke opened this issue 1 year ago • 15 comments

Add gfortran support for all docker except target of *-none* and *-andriod*.

Close #1457

Dirreke avatar Mar 13 '24 15:03 Dirreke

/ci try

Emilgardis avatar Mar 13 '24 16:03 Emilgardis

Starting try run. Link to action

github-actions[bot] avatar Mar 13 '24 16:03 github-actions[bot]

Try run for comment

Failed Jobs

Successful Jobs

List

github-actions[bot] avatar Mar 13 '24 17:03 github-actions[bot]

No idea about why x86_64-unknown-dragonfly and x86_64-unknown-netbsd failed

Dirreke avatar Mar 14 '24 06:03 Dirreke

looks good so far!

One issue with this, it doesn't install it for the case where we use Dockerfile.native, which is used when doing cargo build-docker-image x86_64-unknown-linux-gnu --platform="linux/x86_64=x86_64-unknown-linux-gnu" (or just cargo build-docker-image x86_64-unknown-linux-gnu)

Easiest way to fix that would be to just install gfortran in linux-image.sh, perhaps add a install here:

https://github.com/cross-rs/cross/blob/085092ca01d6ac9f5a0b612d9e68bcdf1e50f7ee/docker/linux-image.sh#L420-L423

It seems that common.sh will install it. and I don't need to add it to linux-image.sh

Dirreke avatar Mar 14 '24 07:03 Dirreke

I can also add fortran test CI if needed.

Dirreke avatar Mar 14 '24 10:03 Dirreke

/ci try

lets try again!

Emilgardis avatar Mar 14 '24 19:03 Emilgardis

Starting try run. Link to action

github-actions[bot] avatar Mar 14 '24 19:03 github-actions[bot]

Try run for comment

Failed Jobs

Successful Jobs

List

github-actions[bot] avatar Mar 14 '24 20:03 github-actions[bot]

This failure is related to libc/3618

It failed because of old_locale. I would patch it with gcc8/patches/patch-libgfortran_io_io.h.

Notice: I use the gcc8/patches/patch-libgfortran_io_io.h. It seems that every version of gcc after gcc8 has this patch except gcc9 and I don't know why. Maybe we can create the PR later.

Besides, we should undefine "HAVE_NEWLOCALE" and "HAVE_FREELOCALE", because there's no uselocale on netbsd(ref: gcc-11/libgfortran/io/io.h) and there's no ifdef to check this before gcc-11. According to this, I should set ac_cv_func_newlocale=no, ac_cv_func_freelocale=no, ac_cv_func_uselocale=no

Edit nothing about this target. And there's no log remained so I don't know why it failed.

Dirreke avatar Mar 21 '24 09:03 Dirreke

Let's try x86_64-unknown-netbsd and aarch64-linux-android again. Thanks

Dirreke avatar Mar 21 '24 17:03 Dirreke

/ci try

Emilgardis avatar Mar 23 '24 02:03 Emilgardis

Starting try run. Link to action

github-actions[bot] avatar Mar 23 '24 02:03 github-actions[bot]

Try run for comment

Failed Jobs

Successful Jobs

List

github-actions[bot] avatar Mar 23 '24 03:03 github-actions[bot]

Is any idea about why aarch64-linux-android failed? It seems that it just need more time to finish the build.

Dirreke avatar Apr 03 '24 14:04 Dirreke

As libc/3618 has beed merged, let's try again @Emilgardis

Dirreke avatar May 01 '24 06:05 Dirreke

/ci try

Emilgardis avatar May 01 '24 06:05 Emilgardis

Starting try run. Link to action

github-actions[bot] avatar May 01 '24 06:05 github-actions[bot]

Try run for comment

Failed Jobs

Successful Jobs

List

github-actions[bot] avatar May 01 '24 07:05 github-actions[bot]

It doesn't seem to be my fault. Should we try again? Or could we merge it?

Dirreke avatar May 01 '24 07:05 Dirreke

timeout again. Could we adjust the settings of action?

Dirreke avatar May 01 '24 09:05 Dirreke

it should already be maxed out: https://github.com/cross-rs/cross/actions/runs/8907127039/workflow#L188 however I remember something about it not applying like you would expect. Lets just try again

Emilgardis avatar May 01 '24 10:05 Emilgardis