Genivia / RE-flex

A high-performance C++ regex library and lexical analyzer generator with Unicode support. Extends Flex++ with Unicode support, indent/dedent anchors, lazy quantifiers, functions for lex and syntax error reporting and more. Seamlessly integrates with Bison and other parsers.
https://www.genivia.com/doc/reflex/html
BSD 3-Clause "New" or "Revised" License
504 stars 85 forks source link

v4.0.0 error building with MinGW-w64 #195

Closed brechtsanders closed 6 months ago

brechtsanders commented 6 months ago

When building with MinGW-w64 I encountered the following error:

[36/37] Linking CXX shared library libreflex.dll
FAILED: libreflex.dll libreflex.dll.a
C:\Windows\system32\cmd.exe /C "cd . && D:\Prog\winlibs-gcc13.2.0-posix-msvcrt-11.0.1\mingw64\bin\c++.exe -O3 -DNDEBUG   -shared -o libreflex.dll -Wl,--out-implib,libreflex.dll.a -Wl,--major-image-version,0,--minor-image-version,0 CMakeFiles/ReflexLib.dir/lib/convert.cpp.obj CMakeFiles/ReflexLib.dir/lib/debug.cpp.obj CMakeFiles/ReflexLib.dir/lib/error.cpp.obj CMakeFiles/ReflexLib.dir/lib/input.cpp.obj CMakeFiles/ReflexLib.dir/lib/matcher.cpp.obj CMakeFiles/ReflexLib.dir/lib/pattern.cpp.obj CMakeFiles/ReflexLib.dir/lib/posix.cpp.obj CMakeFiles/ReflexLib.dir/lib/simd_avx2.cpp.obj CMakeFiles/ReflexLib.dir/lib/simd_avx512bw.cpp.obj CMakeFiles/ReflexLib.dir/lib/unicode.cpp.obj CMakeFiles/ReflexLib.dir/lib/utf8.cpp.obj CMakeFiles/ReflexLib.dir/lib/matcher_avx2.cpp.obj CMakeFiles/ReflexLib.dir/lib/matcher_avx512bw.cpp.obj CMakeFiles/ReflexLib.dir/unicode/block_scripts.cpp.obj CMakeFiles/ReflexLib.dir/unicode/language_scripts.cpp.obj CMakeFiles/ReflexLib.dir/unicode/letter_scripts.cpp.obj  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/Prog/winlibs-gcc13.2.0-posix-msvcrt-11.0.1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ReflexLib.dir/lib/unicode.cpp.obj:unicode.cpp:(.text+0x7ca): undefined reference to `reflex::Unicode::Tables::composer()'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

The solution was add unicode/composer.cpp to the sources specified with set(lib_sources in CMakeLists.txt.

genivia-inc commented 6 months ago

Ah, yes this is a new source addition added to the makefiles, except for the oversight to add it to CMakeLists.txt too.

This happened because I don't use CMakeLists.txt in my dev version.

Building with ./build.sh works on Cygwin. So why not use it for MinGW?

genivia-inc commented 6 months ago

I've committed a fix to `CMakeLists.txt.

I will update the RE/flex releases later. Or do you need a tagged version or release right now, e.g. for packaging?

brechtsanders commented 6 months ago

Thanks.

No hurry from my side for a new release.

genivia-inc commented 6 months ago

I've released 4.0.1 with the fix and I've also included some extra examples in this release.

Sigh... So as I am releasing these updates with the help of people who use RE/flex and contribute to it, apparently someone does not like that I bump up the RE/flex version information on the Wikipedia RE/flex page for every RE/flex release. He seems to think that I personally have "a conflict of interest" and that I am "promoting myself or the project" (see Talk page), when in fact I've made many minor updates (80%-90%) to bump the version info on Wikipedia. This is ridiculous. I am not gaining anything in value for doing this work, nor do I do this for anyone one else who gains by this. RE/flex is free, because I like to work on this sort of stuff for decades. Genivia is my org where I can do that.

If someone volunteers to update the RE/flex version info on Wikipedia from now on, then please do!

Also, feel free edit the RE/flex page if anything is not factual, biased or incorrect.

arnoldrobbins commented 6 months ago

Dr. van Engelen,

Sigh... So as I am releasing these updates with the help of people who use RE/flex and contribute to it, apparently someone does not like that I bump up the RE/flex version information on the Wikipedia RE/flex page for every RE/flex release. He seems to think that I personally have "a conflict of interest" and that I am "promoting myself or the project" (see Talk page), when in fact I've made many minor updates (80%-90%) to bump the version info on Wikipedia. I am also not gaining anything in value for doing this work, nor do I do this for anyone one else who gains by this. RE/flex is free, because I like to work on this sort of stuff for decades. Genivia is my org where I can do that.

The world is full of low-lives. As someone who's been maintaining free software for decades, I've learned that you just have to ignore them and get on with doing what you do. It's much like the old saw that theatre critics are like eunuchs in a harem. They can sit on the side and comment and criticize all they want about technique, but they can't actually perform. That's the case here too.

Keep up the good work!

genivia-inc commented 6 months ago

Perhaps my fault is that I am a bit of a perfectionist, because I listen to people who want additions to the project or have suggestions. Anyone can contribute and PR if they like or suggest improvements by opening issues, which is usually easier (for them). There are hundreds if not thousands of RE/flex users and projects that use RE/flex, judging from the stats that GitHub produces. That's what keeps this project going with the help and contributions by others. And that's why new versions keep on rolling.

The project is notable, not only because independent users use RE/flex and like it, but also because it is used by several other notable projects, including in compilers such as the Tiger Compiler. I have no associations with any of these projects. But I can't mention projects on the RE/flex Wikipedia page, because it would be considered promotional (which that guy removes, which makes sense to remove such non-Wikipedia links as per guidelines). So I'm left in a bind and let him run free.

Notably LibHunt "C++ regex" https://www.libhunt.com/l/cpp/topic/regex as of today lists RE/flex as a top #4 project (ugrep is #2). Here is a screen dump (Feb 29, 2024):

image

It is easy and cheap to put baseless criticism on a page, it is harder to publish something worthwhile that many people use. I don't know what triggered him. I don't know this guy (and for sure he does not know me and the RE/flex users). The comments that he makes on the RE/flex page are not accurate and are a gut punch to me and to RE/flex users. He is looking for some excuse to slap flags on the RE/flex page by saying that I updated the page too often (90%).

Similar projects on Wikipedia are not "attacked" by him, even though those have a similar history to the origins, with a few people contributing to the article, one or two links to articles on the tool typically authored by the developer(s), and a similar number of GitHub stars and forks for the project. But don't trust my word for it, just look for Compiler Tools on Wikipedia (e.g. Ragel).

Perhaps that maybe "Genivia" triggered him? Does he think that every tech company (and by implication me) has ulterior motives? I started Genivia, because of other non-free projects I created in the past needed tech support and maintenance that some companies pay for. I also use it to host tutorials and articles for free to everyone. I am the boss. With Genivia, I have enough time to work on things that I like to do, not that someone else wants me to do.

If someone want to update and improves the Wikipedia RE/flex page, like others have done in the past, then that would be nice.

Edit: added context.