-
-
Notifications
You must be signed in to change notification settings - Fork 544
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
Add libslipr dependency to CMakeLists and pipelines #681
Conversation
Looks good, though the CMake scripts in the slurp branch are outdated, could you redo your changes on those on top of the ones from master? |
Would you like me to rebase this branch on master or simply copy/paste the CMakeLists.txt from master here and update them? |
We changed the CI workflows to run only on master and PRs because failed runs on WIP branches were annoying people, but I'm fine with reverting that if it doesn't bother others.
Rebasing would be best. |
c6f7210
to
577bee6
Compare
I rebased my branch on master but github see it conflicts with
|
Nevermind, something is not working. I cannot run the binary. I'm checking. |
If I remember right, you only actually need to link libiconv when making a static build. |
On linux CMake should return an empty variable since it is part of the libc6. I do not know about the dynamic linked Windows build though, I'll try. I cannot figure what went wrong and why I cannot start the binary. I'll restart the rebase from scratch and check step by step. |
Sorry, actually rebasing here is a bad idea, my bad for suggesting it, I forgot about the implications of rebasing onto master. If we do it now via PR I think it will mess up the history and make merging the branch back harder. For the same reason I'm not sure if cherry-picking CMake script changes from master to merge back in slirp is a good idea. You can try doing that and then rebasing slirp on master locally to see if it generates conflicts. If not I don't mind either way. Otherwise I favor the initial approach of ignoring the upstream changes, since conflicts with small commits are simpler to solve. Sorry again for the misleading comment, you can use git reflog to find the pre-rebase state to revert to. |
I see what's wrong. You were right, it's about I cannot figure why using
Even so the variable contains a valib path : I'll keep |
@rzumer Alright then. No problem, I'll revert it and add the small changed I mentioned here #681 (comment) |
Foe static linking you're supposed to use |
577bee6
to
b094743
Compare
There is no I tried to print it too. |
There should be when you use pkg-config? |
b094743
to
a4585f9
Compare
If we use pkg-config then it needs to be specific to the Windows build because the linux one is not going to find libiconv as it is not a package but part of the libc6. That's why cmake has a specific module for this that's called when doing For linux it will likely return an empty variable, allowing us to write the same instructions for both linux and windows. Well... in theory, since for some yet unknown reason it fails to run with the variable set by the module. |
I've already fixed this in a way that works on both Windows and Linux but never got around to doing the PR. I'll find it when I come home tomorrow and post. |
a4585f9
to
ff15258
Compare
Oh, it works on both Linux and Windows since I only link iconv in the Windows build. The current issue you are seeing is simply me removing the gtk3++ dependency and forgetting to add glib2 headers. I'm fixing that. I was just annoyed I could not find a more elegant way to format the CMakeLists.txt using only one build agnostic declaration. cmake is even able to throw an error when it does not find iconv now, it did not do that before. |
glib shouldn't be needed, if it is for the slirp branch it's because it was branched before the dependency was removed by my PR here. |
1b7feb2
to
bb40d9b
Compare
Indeed: https://github.com/Arisotura/melonDS/blob/slirp/src/frontend/qt_sdl/Platform.cpp#L40 You will have to remove it later or else this branch won't build. :( |
I'm sadly not the most knowledgeable about git, but if we merged my branch into the slirp branch and you rebased on that, would it cause issues later? |
If your branch is merged in master it might, otherwise it should be fine. |
When I rebased the branch earlier I only found merge conflicts in the CMakeLists.txt files so I believe we will be able to merge the branch safely into master. (right now I'm installing WSL Ubuntu 20 on Windows to figure where glib.h is packaged :'D ) |
Maybe we should rebase the slirp branch on master and work from that, seems like that will avoid the headache of merging all this later? |
That's fine too if you don't mind force pushing. |
I believe both rebasing slirp branch and merging master into slirp should represent the same amount of work. It's really about how you want the history to show on master. |
It seems like we use merges over rebases anyway, so I guess the order does not matter much. |
Right now this part of the CMakeLists.txt is necessary for the linux pipeline to build:
It worked before because I rebased the branch on master which did not use glib anymore. I could maybe find another more elegant way to write this but why bother if you plan on removing it when merging. |
bb40d9b
to
5a5e60a
Compare
Ok! Last commit. :D I have spent enough time on this today to understand what are the changes between the building of slirp and master. We cannot use the latest CMakeLists.txt version on slirp since it is too far behind master and requires the glib dependency. I fixed the pipeline so slirp branch can build again but the rest of the changes will have to be made when merging slirp with master. |
Done in #682 |
This fixes both pipelines by adding libslirp both to the CMaleLists.txt dependencies and the github pipelines.
Some things to take into account: