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

Lower GLIBC requirements by using building linux natives on ubuntu 18.04 docker #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

theofficialgman
Copy link

@theofficialgman theofficialgman commented Jul 6, 2023

alternative #22

@streamingdv
Copy link

streamingdv commented Oct 24, 2023

@theofficialgman hi, just curious does the github action build still work on your side? I had recently problems on my end so I checked out your changes but still it doesn't seem to succeed building the Linux binaries. Here is a test fork of my project

https://github.com/streamingdv/Jamepad/

Are you encountering the same issues in your fork branches?
It seems the docker branch fixes the strange issue "Unable to locate package linux-libc-dev:i386" which seems to be occurring recently but fails now at run make -j make not found. E.g.

https://github.com/streamingdv/Jamepad/actions/runs/6625468273/job/17996650912

@streamingdv
Copy link

@theofficialgman okay fixed it, I think something has changed in the docker build image

streamingdv@c077df9

Fails now on the Gradle task...

@theofficialgman
Copy link
Author

@theofficialgman okay fixed it, I think something has changed in the docker build image

streamingdv@c077df9

Fails now on the Gradle task...

link:
     [exec] g++: error: /__/__w/Jamepad/Jamepad/SDL/build-linux32/build/.libs/libSDL2.a: No such file or directory

yeah strange. this is happening in jamepad master branch as well. I can reproduce on my x86_64 computer locally as well. there is no libSDL2.a produced by the make command.

this is strange as nothing has changed at all that I can see.

maybe gradle was previously able to use these files instead

│   ├── libSDL2.la
│   ├── libSDL2main.la
│   ├── libSDL2_test.la

@streamingdv
Copy link

Yeah I saw that, It's super strange, the make command passes now but the necessary output files weren't build. Nothing changed and I'm not sure what is causing that problem all of a sudden.

I did not yet check on a real machine, does these files maybe get outputted to a different location than previously expected?

@streamingdv
Copy link

@theofficialgman for testing purposes I just reverted the build action file to the original and disabled all Linux builds in it (only Windows x64/x86 enabled) and it seems that is working. (I removed the linux-libc-dev:i386 dependency as well)

https://github.com/streamingdv/Jamepad/blob/master/.github/workflows/pushaction.yml

So something different when make is building the Linux stuff. Not sure if it only affects Linux x86 maybe? Windows binaries can be successfully produced

https://github.com/streamingdv/Jamepad/actions/runs/6629530789

.github/workflows/pushaction.yml Outdated Show resolved Hide resolved
@theofficialgman
Copy link
Author

ok too me many hours but I finally realized what the actual issue is @streamingdv

[exec] g++: error: /__/__w/Jamepad/Jamepad/SDL/build-linux64/build/.libs/libSDL2.a: No such file or directory

the issue is the /__ the beginning of the filepath.... it was never to do with the SDL2 build itself. the issue lies with gradle

@theofficialgman
Copy link
Author

theofficialgman commented Oct 27, 2023

@MrStahlfelge I have spent most of my day trying to bug test your CIs issue with the incorrect filepath issue.
This has no relation to this PR as it happens on the master branch as well.

This PR is good for merging, I will leave it up to you to fix your CI

@MrStahlfelge
Copy link
Member

Probably the fix is already suggested in #21

@theofficialgman
Copy link
Author

Probably the fix is already suggested in #21

Nope. Read again. We have no issues installing dependencies.

Issue is during linking #23 (comment)

As I said. Fix your scripts as is (they don't work) and then you can come back to merging PRs.

@MrStahlfelge
Copy link
Member

Build is fixed now

@theofficialgman
Copy link
Author

@streamingdv
Copy link

@theofficialgman I'm still not 100% sure what is causing the issue but I had this problem as well in my fork when I used your action script to build inside a docker container. If you are building the lib normally (without using a container) it will work and you will not run into this problem.

@@ -67,10 +94,13 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2

- run: echo "http://ports.ubuntu.com/ubuntu-ports" | sudo tee -a /etc/apt/apt-mirrors.txt
- run: sudo sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list
- run: sudo grep "ubuntu.com/ubuntu" /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/ports.list

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need sudo to grep in that sources.list file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, not sure why I put it there.

using ports.ubuntu.com and archive/security.ubuntu.com via specifying the arch variable in sources lists is the proper method. this will produce no apt update errors and will actually obtain all package info
@theofficialgman
Copy link
Author

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.

None yet

4 participants