-
Notifications
You must be signed in to change notification settings - Fork 27
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
onig deprecation warnings #145
Comments
…ilenced (-Wdeprecated-non-prototype)
I've just tried to update Onigmo to the latest version 6.2.0, but it still throws these errors. Edbee uses the https://github.com/k-takata/Onigmo?tab=readme-ov-file Oniguruma mod, but this project seems to stand still. For the future we should check if the original https://github.com/kkos/oniguruma can be used. |
@vadi2 I've made a branch with a newer Onigmo library and silencing the specific warning. Like I mentioned for the future I think a better option is to upgrade to Oniguruma, but I think that could have some issues with some unsupported regexp options. (Got to checkout what the latest Ruby core uses) |
Compile is happier now using that branch! I agree it would be nice to change over to Oniguruma. I think it would help in compiling the wasm version as well - last time I tried that, I got blocked by something on Onigmo. |
Please see: https://github.com/edbee/edbee-lib#r145499264 ... |
@SlySven have you got ideas? |
One other detail that might encourage a switch back to Oniguruma from the Onigmo fork is that that latter has had no updates (other than for typos - some of them imported from the original library) since 2019 and even those haven't made it into the 6.2.0 release of that date - the last Unicode version it refers to is 12.1 though it is not clear to me if that is important. In comparison the original released it's own 6.9.9 release only last month, including an update for Unicode 16.0 - so if you can reformulate the appropriate parts of your code to use the original it would probably be for the best... |
Hi @SlySven, I totally agree with this. When I started edbee I choose Onigmo because it had extension which were used by Textmate grammars. Using Oniguruma will cause some Textmate not to function anymore. (If that's still the case I don't know) |
- remove onigmo (vendor/onig) - add oniguruma subtree oniguruma with some build patches Squashed 'vendor/oniguruma/oniguruma/' content from commit 5eaee9f5 git-subtree-dir: vendor/oniguruma/oniguruma git-subtree-split: b68e7f7e036eede1e929b7c9ae5995af76339593
- remove onigmo (vendor/onig) - add oniguruma subtree oniguruma with some build patches Squashed 'vendor/oniguruma/oniguruma/' content from commit 5eaee9f5 git-subtree-dir: vendor/oniguruma/oniguruma git-subtree-split: b68e7f7e036eede1e929b7c9ae5995af76339593
- remove onigmo (vendor/onig) - add oniguruma subtree oniguruma with some build patches Squashed 'vendor/oniguruma/oniguruma/' content from commit 5eaee9f5 git-subtree-dir: vendor/oniguruma/oniguruma git-subtree-split: b68e7f7e036eede1e929b7c9ae5995af76339593
Hi @vadi2 and @SlySven, I just finished a feature/oniguruma branch. I tried to build it for cmake / qmake on Windows / Mac OS X (Linux should be fine but I'm not sure). It uses an unpatched copy of Oniguruma. |
Nice, I will try it! Semi-related, last time I tried to compile Mudlet for WASM, I was blocked by issues in this area... would be nice if those are fixed too. |
Builds failed on Ubuntu, macOS using CMake for the same reason: Windows builds with qmake failed with... a strange error: https://github.com/Mudlet/Mudlet/actions/runs/12767874863/job/35587100183?pr=7661#step:7:85 |
Hi @vadi2, that's strange. Config.h should have be generated via configure on a *nix/os x environment.
For cmake: SET(ONIG_DIR "${CMAKE_CURRENT_SOURCE_DIR}/oniguruma")
IF(NOT WIN32)
message(STATUS "ONIGURUMA Unix Like - patch and configure")
EXECUTE_PROCESS(
COMMAND "cp -Rp ${CMAKE_CURRENT_SOURCE_DIR}/patch/* ${ONIG_DIR}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
EXECUTE_PROCESS(
COMMAND ${ONIG_DIR}/configure
WORKING_DIRECTORY ${ONIG_DIR}
)
ENDIF(NOT WIN32)
IF(WIN32)
message(STATUS "ONIGURUMA Win32 - patch and copy config.h")
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/patch/ DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/oniguruma/)
file(COPY_FILE ${CMAKE_CURRENT_SOURCE_DIR}/oniguruma/src/config.h.windows.in ${CMAKE_CURRENT_SOURCE_DIR}/oniguruma/src/config.h)
ENDIF(WIN32) For Qmake: (.pri) # !win32:system($$PWD/oniguruma/configure)
!win32:system("cp -Rp $$PWD/patch/* $$PWD/oniguruma/")
## The line below doesn't work because autoreconf is not in the default path
# !win32:system("cd $$PWD/oniguruma; autoreconf -vfi; ./configure; cd -")
!win32:system("cd $$PWD/oniguruma; ./configure; cd -")
win32 {
edbee_xcopy_command.target = edbee_xcopy_files
edbee_xcopy_command.commands = xcopy /s /e /Y /I $$shell_quote($$shell_path($$PWD/patch/*)) $$shell_quote($$shell_path($$PWD/oniguruma/))
edbee_xcopy_command.commands += && copy $$shell_quote($$shell_path($$PWD/oniguruma/src/config.h.windows.in)) $$shell_quote($$shell_path($$PWD/oniguruma/src/config.h))
PRE_TARGETDEPS += edbee_xcopy_files
QMAKE_EXTRA_TARGETS += edbee_xcopy_command
} This should have been executed with qmake or cmake I don't really sure what's the best choice with this. |
A general config.h would be nice I reckon, because otherwise generating it takes time. |
For the Windows build case it seems to be using Windows native xcopy /s /e /Y /I '/D/a/Mudlet/Mudlet/3rdparty/edbee-lib/vendor/oniguruma/patch/*' /D/a/Mudlet/Mudlet/3rdparty/edbee-lib/vendor/oniguruma/oniguruma/ && copy /D/a/Mudlet/Mudlet/3rdparty/edbee-lib/vendor/oniguruma/oniguruma/src/config.h.windows.in /D/a/Mudlet/Mudlet/3rdparty/edbee-lib/vendor/oniguruma/oniguruma/src/config.h the thing is - for Mudlet Windows builds - this is being run in a I've got to boot up Windows for something else this afternoon so I'll play with this though I can't promise anything at this point. |
Hi @SlySven I'm working on a simple general config.h (no external commands, like autoconf or other (x)copy operation needed). |
For the moment any Windows builds for our project does need to support both 32 and 64 bit Windows. As an aside I do recall that in the past (haven't checked recently) that |
Building the latest commit via qmake and cmake on windows 11 (64bits) seems to work correctly. The general supplied windows config file of oniguruma supports both 32/64 bits (with defines). |
Well that (getting things to make a workable 😀 |
Hmm, so I have most definitely updated the edbee-lib submodule to yesterday's commit correctly, but the config.h build issues persist. What is good now is that it is the same error across cmake in macos and linux and qmake in windows: windows: https://github.com/Mudlet/Mudlet/actions/runs/12802647668/job/35694079755?pr=7661#step:20:487 Everything does look correct on edbee's part, so I am not immediately sure where the issue is, could be something I did. I'll look at it more later on. |
You're right, when I'm looking at GitHub I see the config.h is missing. (Sorry about that) |
Just pushed a new commit. config.h is now definitely in it (https://github.com/edbee/edbee-lib/blob/feature/oniguruma/vendor/oniguruma/oniguruma/src/config.h) |
Nice, that builds and runs okay! I did some light testing and it checks out. |
The onig library is throwing up a lot of errors about deprecated functionality, e.g.
/Users/vadim.peretokin/Programs/Mudlet/3rdparty/edbee-lib/vendor/onig/st.c:856: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
/Users/vadim.peretokin/Programs/Mudlet/3rdparty/edbee-lib/vendor/onig/st.c:856:6: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
if (PTR_EQUAL(tab, &entries[i], hash_value, key))
^
/Users/vadim.peretokin/Programs/Mudlet/3rdparty/edbee-lib/vendor/onig/st.c:177:35: note: expanded from macro 'PTR_EQUAL'
((ptr)->hash == (hash_val) && EQUAL((tab), (key_), (ptr)->key))
^
/Users/vadim.peretokin/Programs/Mudlet/3rdparty/edbee-lib/vendor/onig/st.c:175:62: note: expanded from macro 'EQUAL'
#define EQUAL(tab,x,y) ((x) == (y) || (*(tab)->type->compare)((x),(y)) == 0)
^
Is there anything we can do about it?
The text was updated successfully, but these errors were encountered: