2.23.11 build failure on cygwin #2

Marco Atzeri <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.bugs
Message-ID <[email protected]>
second issue building on Cygwin

The Cygwin headers are very picky and the "-std=c++14" cause some not
standard calls to fail compilation due to the reduced scope.

The solution is to remove the "-std=c++14" or to replace with "-std=gnu++14"


Only two cases showed up in my build:

---------------------------------------------------------------------
g++ -c    -DHAVE_CONFIG_H 
-I/pub/devel/lilypond/prova/lilypond-2.23.11/lily/include -I./out 
-I/pub/devel/lilypond/prova/lilypond-2.23.11/flower/include -O2 
-finline-functions -g -pipe -Wno-cast-function-type 
-isystem/usr/include/guile/2.2/guile/2.2 -isystem/usr/include/freetype2 
-isystem/usr/include/libpng16 -isystem/usr/include/pango-1.0 
-isystem/usr/include/glib-2.0 -isystem/usr/lib/glib-2.0/include 
-isystem/usr/include/freetype2 -isystem/usr/include/libpng16 
-isystem/usr/include/uuid -isystem/usr/include/harfbuzz    -std=c++14 
-fno-exceptions -Wall -Wconversion -Wextra -Wold-style-cast 
-Woverloaded-virtual -Wsuggest-override  -MMD -MP -MF ./out/main.dep -MT 
./out/main.o  -o out/main.o main.cc
main.cc: In function ‘void do_chroot_jail()’:
main.cc:470:7: error: ‘chroot’ was not declared in this scope
   470 |   if (chroot (components[JAIL].c_str ()))
       |       ^~~~~~
make[1]: *** [../make/c++-rules.make:5: out/main.o] Error 1
make[1]: Leaving directory '/pub/devel/lilypond/prova/lilypond-2.23.11/lily'
make: *** [make/generic-targets.make:6: all] Error 2
----------------------------------------------------------------------
# Making lily/out/relocate.o < cc
g++ -c    -DHAVE_CONFIG_H 
-I/pub/devel/lilypond/prova/lilypond-2.23.11/lily/include -I./out 
-I/pub/devel/lilypond/prova/lilypond-2.23.11/flower/include -O2 
-finline-functions -g -pipe -Wno-cast-function-type 
-isystem/usr/include/guile/2.2/guile/2.2 -isystem/usr/include/freetype2 
-isystem/usr/include/libpng16 -isystem/usr/include/pango-1.0 
-isystem/usr/include/glib-2.0 -isystem/usr/lib/glib-2.0/include 
-isystem/usr/include/freetype2 -isystem/usr/include/libpng16 
-isystem/usr/include/uuid -isystem/usr/include/harfbuzz    -std=c++14 
-fno-exceptions -Wall -Wconversion -Wextra -Wold-style-cast 
-Woverloaded-virtual -Wsuggest-override  -MMD -MP -MF ./out/relocate.dep 
-MT ./out/relocate.o  -o out/relocate.o relocate.cc
relocate.cc: In function ‘int sane_putenv(const char*, const string&, 
bool, bool)’:
relocate.cc:65:17: error: ‘strdup’ was not declared in this scope; did 
you mean ‘strcmp’?
    65 |       char *s = strdup (combine.c_str ());
       |                 ^~~~~~
       |                 strcmp
relocate.cc:69:20: error: ‘putenv’ was not declared in this scope; did 
you mean ‘getenv’?
    69 |       int retval = putenv (s);
       |                    ^~~~~~
       |                    getenv
relocate.cc: In function ‘void setup_paths(const char*)’:
relocate.cc:218:15: error: ‘realpath’ was not declared in this scope
   218 |   char *res = realpath (argv0_abs.c_str (), resolved_path);
       |               ^~~~~~~~
make[1]: *** [../make/c++-rules.make:5: out/relocate.o] Error 1
--------------------------------------------------------------------


Regards
Marco

_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.