-
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
Cygwin instructions in README do not work #170
Comments
Since the OP is already quite long, just wanted to add this comment: Having realized that the default is C++17, I wanted to see how the build would behave for C++11; so I replaced this line: diff --git a/GNUmakefile b/GNUmakefile
index 2033339..c263cf6 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -156,7 +156,7 @@ ifeq ($(OS), windows_nt)
EXEPOSTFIX=.exe
endif
ifeq ($(OSTYPE), cygwin)
- $(info using settings for OS=Windows_NT, OSTYPE=cygwin)
+ $(info using settings for OS=Windows_NT, OSTYPE=cygwin)
# call make OSTYPE=cygwin
BSWITCH=103
DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
@@ -164,7 +164,7 @@ ifeq ($(OS), windows_nt)
DUMA_DYN_DEPS=
DUMASO=
CFLAGS=-g -O0 -DWIN32 -Wall -Wextra
- CPPFLAGS=-g -O0 -DWIN32 -Wall -Wextra
+ CPPFLAGS=-g -O0 -DWIN32 -Wall -Wextra -std=gnu++11
LIBS=
EXEPOSTFIX=.exe
endif ... and now the process looks like this:
So now the "dynamic exception specifications" are warnings, not errors, and the And, another note - I tried this patch, to build the dynamic library (the diff --git a/GNUmakefile b/GNUmakefile
index 2033339..c93e0fa 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -156,15 +156,16 @@ ifeq ($(OS), windows_nt)
EXEPOSTFIX=.exe
endif
ifeq ($(OSTYPE), cygwin)
- $(info using settings for OS=Windows_NT, OSTYPE=cygwin)
+ $(info using settings for OS=Windows_NT, OSTYPE=cygwin)
# call make OSTYPE=cygwin
BSWITCH=103
DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
CURPATH=./
- DUMA_DYN_DEPS=
- DUMASO=
+ #DUMA_DYN_DEPS=
+ DUMASO=libduma.dll
+ DUMASO_LINK1=libduma.dll
CFLAGS=-g -O0 -DWIN32 -Wall -Wextra
- CPPFLAGS=-g -O0 -DWIN32 -Wall -Wextra
+ CPPFLAGS=-g -O0 -DWIN32 -Wall -Wextra -std=gnu++11
LIBS=
EXEPOSTFIX=.exe
endif
@@ -595,9 +596,9 @@ testmemlimit_so$(EXEPOSTFIX): testmemlimit_so.o
$(OBJECTS) tstheap.o dumatest.o thread-test.o testmt.o dumatestpp.o: duma.h
-ifeq ($(OS), windows_nt)
- # do nothing
-else
+#ifeq ($(OS), windows_nt)
+# # do nothing
+#else
ifeq ($(OS), darwin)
$(DUMASO): duma_config.h verinfo.h $(SO_OBJECTS)
@@ -611,8 +612,8 @@ $(DUMASO): duma_config.h verinfo.h $(SO_OBJECTS)
# $(CXX) -g -shared -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
endif
-
-endif
+#
+#endif
#
# define rules how to build objects for createconf Build log is like this:
... and running
|
Thank you for the report. As you can obviously tell, I've not tried to use DUMA on Cygwin recently (that is, in many years), and not since changes were made to the Makefiles, hence the issues you had. I apologize for that, and I'll get your Cygwin-related Makefile fixes integrated into master sometime this week. I've installed the current Cygwin release in Windows 11 in a virtual machine here, and I'll be testing it this week. I recall there was some issue using the dynamic library as well, but your confidence test passing above seems to indicate that's also outdated. I'll do a few other tests but I think this default is also safe to change. As far as I can tell, there aren't any "old" Cygwin versions easily available - the Cygwin installer is a network installer that installs the most recent software, in the style of a "rolling" distribution -- while that makes things a little tough to pin down and to document, such as when something started working, it also means there isn't any major concerns about backwards (in)compatibilities. About the C++ warning - it is, for now, just warning and should have no effect on your use of DUMA at this time. I'm aware of it and will probably have to make changes in the future, but I've avoided making major and possibly breaking changes that aren't strictly necessary, at least for now. We have enough "churn" that I don't want to introduce it into my debugging tools unnecessarily. A quick test on Windows shows another minor but annoying bug - the version information script doesn't like to run from a directory that contains spaces, so I'll fix that too. Have you tried using the CMake build system on Cygwin? If you have (or you get to it before I do), please advise me of the experience. |
Thanks for the response, @johnsonjh - great to have a status on how thing are!
Yeah, that is my experience as well...
Agreed!
Good - thanks for confirming!
No I haven't - I'm not much of a CMake guy, so I only use it when instructions tell me I have to :) So unfortunately, I will not be able to report back on the experience... Thanks again for the response! |
Just got a working Cygwin configuration up. Just to update you, looks like some extra adjustments will need to be done to get current Cygwin working in master, and have it work the same way in both Cmake and GNU Make. If your local changes above are sufficient for you, they should work sufficiently for now. |
Will handle with #193 |
I'm trying to build the DUMA library on cygwin:
I'm trying to follow https://github.com/johnsonjh/duma/blob/b35dea7/README.md:
Ok:
skipped, because:
OK:
https://stackoverflow.com/questions/16135945/is-there-a-cygwin-version-of-gnu-make :
Ok, then, let's try with
make
:Now, I've been setting variables on the
make
command line before, it should work - I have no idea why it does not work here?!Even trying to set as an environment variable (in front of the command line) fails:
Strangely, both $OS and $OSTYPE exist in cygwin - in a brand new bash shell:
Actually, it seems that the makefile depends on OS being lowercase:
... and also:
So, I added this line
$(info using OS $(OS) OSTYPE $(OSTYPE))
to Makefile (before "# some OS specifics"), and I can see:Right, so cygwin_nt-10.0 is definitely not a match; trying this, having removed my print line from above
For some reason, there is a tab at start of line 159:
If I manually replace the TAB with four spaces, finally I get something:
Well,
/bin/sh: ./make_git_source_version.sh: No such file or directory
occurs because we're inbuild
subdirectory, andmake_git_source_version.sh
exists in its parent ... The problem here is that the makefile uses:CURPATH gets set per OS/OSTYPE, and for cygwin it is
./
, so here, I replaced it with this (via https://stackoverflow.com/a/23324703/6197439):Now we get a bit further, but still:
Again looks like this is some path mess, due to being in
build
subdirectory ...So, I decided to check out everything again, and try run the commands without
mkdir build && cd build
; I still had to change the tab to spaces as per above, but now I got:And
make test
seems to work (sort of):(Note, I get the same result, if I replace the
test
in the above command line withcheck
)Well, it turns out, the current C++ standard for
g++
in Cygwin is indeed C++17 (via https://stackoverflow.com/a/44735016/6197439):So, I cannot really tell if the above works as expected, or not - it does look like it works, but I'm not really sure ...
Anyways, just wanted to report this - hope at least I can manage to use what I have, so I can debug my program :)
The text was updated successfully, but these errors were encountered: