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

Building on Cygwin fails #43

Open
fatalerrors80 opened this issue Jun 7, 2022 · 3 comments
Open

Building on Cygwin fails #43

fatalerrors80 opened this issue Jun 7, 2022 · 3 comments

Comments

@fatalerrors80
Copy link

When building on Cygwin (MobaXterm) with embeded Lua integrated, ar returns an error with unknown option "u" (deprecated anyway):

gcc -O2 -Wall -Wextra -DLUA_COMPAT_5_2  -DLUA_COMPAT_5_1 -DLUA_USE_LINUX   -c -o lcorolib.o lcorolib.c
gcc -O2 -Wall -Wextra -DLUA_COMPAT_5_2  -DLUA_COMPAT_5_1 -DLUA_USE_LINUX   -c -o ldblib.o ldblib.c
mv -f .deps/dit-Display.Tpo .deps/dit-Display.Po
mv -f .deps/dit-md5.Tpo .deps/dit-md5.Po
rm -f libeditorconfig.a
mv -f .deps/dit-Text.Tpo .deps/dit-Text.Po
gcc -O2 -Wall -Wextra -DLUA_COMPAT_5_2  -DLUA_COMPAT_5_1 -DLUA_USE_LINUX   -c -o liolib.o liolib.c
ar cru libeditorconfig.a editorconfig/src/libeditorconfig_a-ec_fnmatch.o editorconfig/src/libeditorconfig_a-editorconfig.o editorconfig/src/libeditorconfig_a-editorconfig_handle.o editorconfig/src/libeditorconfig_a-ini.o editorconfig/src/libeditorconfig_a-misc.o
gcc -O2 -Wall -Wextra -DLUA_COMPAT_5_2  -DLUA_COMPAT_5_1 -DLUA_USE_LINUX   -c -o lmathlib.o lmathlib.c
ar: unknown option -- u
BusyBox v1.22.1 (2015-11-10 11:07:12    ) multi-call binary.

Usage: ar [-o] [-v] [-p] [-t] [-x] ARCHIVE FILES

Extract or list FILES from an ar archive

        -o      Preserve original dates
        -p      Extract to stdout
        -t      List
        -x      Extract
        -v      Verbose

make[1]: *** [Makefile:503: libeditorconfig.a] Error 1

If I remove manually the "u" option in "Makefile" and "lua-5.3.0/src/Makefile", the compilation complete without any more errors, but running dit.exe fails with a segmentation fault. Using gdb I've got the following details:

Type "apropos word" to search for commands related to "word"...
Reading symbols from ./dit.exe...done.
(gdb) run
Starting program: /home/mobaxterm/dit-master/dit.exe
[New Thread 19268.0x4d18]
[New Thread 19268.0x35f0]
[New Thread 19268.0x1cec]
[New Thread 19268.0x16b4]

Thread 1 "dit" received signal SIGSEGV, Segmentation fault.
0x6f7e4dfb in has_colors_sp () from /usr/bin/cygncursesw-10.dll
hishamhm added a commit that referenced this issue Jun 7, 2022
Should be harmless for other platforms.

See #43.

I really need to update this embedded Lua instead.
@hishamhm
Copy link
Owner

hishamhm commented Jun 7, 2022

Thanks for the report!

When building on Cygwin (MobaXterm) with embeded Lua integrated, ar returns an error with unknown option "u" (deprecated anyway):

I pushed a commit removing u from the Lua makefile.

0x6f7e4dfb in has_colors_sp () from /usr/bin/cygncursesw-10.dll

That's weird! This sounds like a build issue. Perhaps some incompatibility between your curses headers and your library?

@fatalerrors80
Copy link
Author

Hi, sorry for late answer!

After I did a git pull, the build problem disapeared from the lua lib linking. But it remains for the libconfigeditor.a linking.

About the version of ncurse, I took the version shipped by cygwin, supposingly identical for binaries and headers. Compiling with ./configure --disable-ncurses don't change a thing.

@fatalerrors80
Copy link
Author

Here is version returned by cygcheck of ncurses libraries and header with integrity check:

libncurses++w10               6.0-12.20171125           OK
libncurses-devel              6.0-12.20171125           OK

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

No branches or pull requests

2 participants