On Fri, Aug 20, 2021 at 12:55 PM Arjen Markus <arjen.markus...@gmail.com> wrote: > > Okay, that solved that error, now I get: > > .... -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 > -fdiagnostics-show-location=once -ffunction-sections -fdata-sections > -frandom-seed=fs_ops.lo -fimplicit-templates -g -O2 -c > ../../../../../../libstdc++-v3/src/c++17/fs_ops.cc -o fs_ops.o > In file included from ../../../../../../libstdc++-v3/src/c++17/fs_ops.cc:58: > ../../../../../../libstdc++-v3/src/c++17/../filesystem/ops-common.h: In > function 'const char* > std::filesystem::get_temp_directory_from_env(std::error_code&)': > ../../../../../../libstdc++-v3/src/c++17/../filesystem/ops-common.h:601:25: > error: '::secure_getenv' has not been declared > 601 | auto tmpdir = ::secure_getenv(env); > | ^~~~~~~~~~~~~ > > and there is a weird subdirectory under the build directory: gccd: - the > colon cannot be part of a directory name under Windows. I guess this is my > mistake, as I set the install directory to "d:/gfortran/work" - that should > become "/cygdrive/d/gfortran/work". Easily fixed, but I do not know what to > do about the first error.
Possibly secure_getenv is not available in cygwin and for some reason AC_CHECK_FUNCS (secure_getenv) as done by libstdc++ configury misdetects it and/or the use site has a different set of includes. Jonathan might know. Note using cygwin (or mingw for that) might make GCC development more painful than necessary. It might be that using a WSL2 based setup is easier if you're stuck to a Windows host. Using Linux in a virtual machine might be another option of course. Richard. > Regards, > > Arjen > > Op vr 20 aug. 2021 om 12:10 schreef Arjen Markus <arjen.markus...@gmail.com>: >> >> >> >> Op vr 20 aug. 2021 om 11:54 schreef Richard Biener: >>> >>> >>> >>> The easiest is probably to build them in-tree by means of >>> executing ./contrib/download_prerequesites which will download >>> and unpack them into your source tree. >>> >> >> Well, I do have the libraries (source and all) and I copied the built >> libraries (that is the content of mpfr/,libs and mpc/.libs to the locations >> that are referred to in the link statement, so I assumed that would enable >> the linker to find them. >> >>> Other than that you are likely either missing some of the requirements >>> or lack the appropriate --with-{gmp,mpc,mpfr}[-lib] configury. >>> >> >> The odd thing is that the link statement as presented in the command window >> knows where to find the libraries. Here is the (hopefully) relevant part: >> >> g++ -std=c++11 -no-pie -g -DIN_GCC -fno-exceptions -fno-rtti >> -fasynchronous-unwind-tables -W -Wall >> (...) ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a >> -L/cygdrive/d/gfortran/gcc/build-gcc/./gmp/.libs >> -L/cygdrive/d/gfortran/gcc/build-gcc/./mpfr/src/.libs >> -L/cygdrive/d/gfortran/gcc/build-gcc/./mpc/src/.libs -lmpc -lmpfr -lgmp >> -L./../zlib -lz libcommon.a ../libcpp/libcpp.a -liconv >> ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a >> ../libdecnumber/libdecnumber.a >> /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: cannot >> find -lmpc >> /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: cannot >> find -lmpc >> /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: cannot >> find -lmpfr >> /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: cannot >> find -lmpfr >> /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: cannot >> find -lmpc >> /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: cannot >> find -lmpfr >> >> >>> What host operating system are you using? >>> >> Cygwin on Windows 10 >> >> Oops, now that I copied the relevant bit of the link command, I see what I >> did wrong: the libraries are under mpfr/./libs, not mpfr/src/.libs (and >> ditto for mpc). >> >> Okay, trying again! >> >> Thanks for the reply. This ought to do it. >> >> Regards, >> >> Arjen