-
Notifications
You must be signed in to change notification settings - Fork 11
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
update genieutils #5
Conversation
README.md
Outdated
@@ -28,7 +28,7 @@ Just install stuff until it stops complaining I guess, sorry. | |||
```sh | |||
git clone --recurse-submodules https://github.com/SiegeEngineers/auto-mods.git | |||
cd auto-mods | |||
./patchGenieutils.sh | |||
patch -d genieutils <genieutils.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
patch -d genieutils <genieutils.patch | |
patch -d genieutils < genieutils.patch |
genieutils.patch
Outdated
-find_library(iconv REQUIRED) | ||
+find_library(iconv iconv REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I am a cmake noob, what does this change do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://cmake.org/cmake/help/latest/command/find_library.html
I think it just defines it shorthand as it should be so it states the <VAR>
and a name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related #1 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually also essential to find libiconv
on MSYS/MingW64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we stick to the format-patch
/apply-patch
approach and not the script, this should be:
-find_library(iconv REQUIRED) | |
+find_library(iconv iconv REQUIRED) | |
-find_library(iconv REQUIRED) | |
+find_package(Iconv REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find_package
should be the preferred method as it's more high-level. As long as that package is deployed with the CMake version. We have to update cmake_minimum_required(VERSION 3.10)
to cmake_minimum_required(VERSION 3.11)
though for this change. But it will close #1 as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened Upstream PR https://github.com/Tapsa/genieutils/pull/3 as that's not an issue with us but in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/Tapsa/genieutils/blob/master/CMakeLists.txt#L19 and https://github.com/Tapsa/genieutils/blob/master/CMakeLists.txt#L35
Which seems strange to me. Could be that we don't even need to patch this anymore if Iconv
is required as an upstream package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably superseded by https://github.com/Tapsa/genieutils/pull/5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tapsa merged @FranciscoDA @HSZemi
genieutils.patch
Outdated
-#set(Boost_USE_STATIC_LIBS ON) | ||
+set(Boost_USE_STATIC_LIBS ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we had problems because of this @HSZemi when we wanted to statically link to boost, no?
And is Boost and everything now statically link as a standard? I thought it was only for distribution reasons to do that once? Now it's the normal way of linking from looking at the readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch is already in the patchGenieutils.sh
file found in master. I simply executed the bash script and generated this patch file with git diff
so the end result should be the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, it's less a review comment then a question to Hszemi, if it's still said that the project should be statically linked in general and not just for special purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need a statically linked binary that I can copy ~wherever~ in order to automatically update the random costs mods daily.
I currently see no benefit in additionally maintaining a dynamically linked version 🤷
11be212
to
3acac7d
Compare
I'm honestly not sure if that |
IMHO, patch files are more robust in this use case since it will not replace unwanted lines (I'm thinking about accidental multiple matches) and it will fail/warn if a hunk was not patched. In short, I think a patching mechanism that fails in an unexpected situation is desirable over one that carries on without a hitch |
I agree that using |
Ok, makes sense to me as well. |
We should wait a bit, I fixed this upstream with a CMake flag like Tracking https://github.com/Tapsa/genieutils/pull/5 Meaning no need for patching anymore. |
README.md
Outdated
@@ -52,7 +52,7 @@ zlib1g-dev | |||
Inside the `repository root` use the following commands: | |||
|
|||
```sh | |||
./patchGenieutils.sh | |||
patch -d genieutils < genieutils.patch | |||
mkdir build | |||
cd build | |||
cmake .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake .. | |
cmake -DSTATIC_COMPILE=TRUE .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs to be added as a flag for CMake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And genieutils
submodule needs to be updated to commit 6297d093db063bb0c6a3d69a3cc82aebfa88a1c6
README.md
Outdated
./patchGenieutils.sh | ||
patch -d genieutils < genieutils.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./patchGenieutils.sh | |
patch -d genieutils < genieutils.patch |
@simonsan thanks, I've updated the genieutils submodule and the |
24dad94
to
d926db7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! ;)
Excellent stuff, thanks a lot 💛 |
update genieutils to work with latest DE patch thanks to latest changes in upstream
patch genie using a patch file
add patch to fix find_library() syntax in genie