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

Windows build from source--error: ‘fileno’ was not declared in this scope #1409

Open
ggetzinger opened this issue Aug 6, 2021 · 0 comments

Comments

@ggetzinger
Copy link

Building from source on Windows 10 Pro gives the following error.

 $ make -j4
cd 3rdparty/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile "C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/3rdparty.pro" CONFIG+=release NOTESTS=yes ) && make -f Makefile
make[1]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty'
cd obiwarp/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile "C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/obiwarp/obiwarp.pro" CONFIG+=release NOTESTS=yes ) && make -f Makefile
Project MESSAGE: using win32 config
C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/obiwarp/obiwarp.pro:27: message(message) requires one argument.
Project MESSAGE: using win32 config
C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/obiwarp/obiwarp.pro:27: message(message) requires one argument.
Project MESSAGE: using win32 config
C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/obiwarp/obiwarp.pro:27: message(message) requires one argument.
make[2]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/obiwarp'
make -f Makefile.Release
make[3]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/obiwarp'
compiling obiwarp.cpp
compiling dynprog.cpp
compiling mat.cpp
compiling vec.cpp
rm -f "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libobiwarp.a" 2>/dev/null
ar -rc "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libobiwarp.a" C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/obiwarp/obiwarp.o C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/obiwarp/dynprog.o C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/obiwarp/mat.o C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/obiwarp/vec.o
make[3]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/obiwarp'
make[2]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/obiwarp'
cd libneural/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile "C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libneural/libneural.pro" CONFIG+=release NOTESTS=yes ) && make -f Makefile
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
make[2]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libneural'
make -f Makefile.Release
make[3]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libneural'
compiling neuron.cc
compiling nnwork.cc
rm -f "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libneural.a" 2>/dev/null
ar -rc "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libneural.a" C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/neural/neuron.o C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/neural/nnwork.o
make[3]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libneural'
make[2]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libneural'
cd libcdfread/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile "C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcdfread/libcdfread.pro" CONFIG+=release NOTESTS=yes ) && make -f Makefile
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
make[2]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcdfread'
make -f Makefile.Release
make[3]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcdfread'
compiling ms10aux.c
compiling ms10enum.c
compiling ms10io.c
rm -f "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libcdfread.a" 2>/dev/null
ar -rc "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libcdfread.a" C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/cdfread/ms10aux.o C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/cdfread/ms10enum.o C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/cdfread/ms10io.o
make[3]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcdfread'
make[2]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcdfread'
cd libcsvparser/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile "C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcsvparser/libcsvparser.pro" CONFIG+=release NOTESTS=yes ) && make -f Makefile
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
make[2]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcsvparser'
make -f Makefile.Release
make[3]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcsvparser'
compiling csvparser.c
rm -f "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libcsvparser.a" 2>/dev/null
ar -rc "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libcsvparser.a" C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/csv_parser/csvparser.o
make[3]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcsvparser'
make[2]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libcsvparser'
cd pugixml/src/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile "C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/pugixml/src/src.pro" CONFIG+=release NOTESTS=yes ) && make -f Makefile
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
make[2]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/pugixml/src'
make -f Makefile.Release
make[3]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/pugixml/src'
compiling pugixml.cpp
rm -f "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libpugixml.a" 2>/dev/null
ar -rc "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libpugixml.a" C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/pugixml/pugixml.o
make[3]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/pugixml/src'
make[2]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/pugixml/src'
cd libpls/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile "C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libpls/libpls.pro" CONFIG+=release NOTESTS=yes ) && make -f Makefile
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
Project MESSAGE: using win32 config
make[2]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libpls'
make -f Makefile.Release
make[3]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libpls'
compiling utility.cpp
rm -f "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libpls.a" 2>/dev/null
ar -rc "C:/msys64/home/Gordon Getzinger/elmaven/build/libs/libpls.a" C:/msys64/home/Gordon\ Getzinger/elmaven/build/tmp/pls/utility.o
make[3]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libpls'
make[2]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/libpls'
cd Logger/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile "C:/msys64/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/Logger/Logger.pro" CONFIG+=release NOTESTS=yes ) && make -f Makefile
make[2]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/Logger'
make -f Makefile.Release
make[3]: Entering directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/Logger'
g++ -c -fno-keep-inline-dllexport -std=c++11 -O2 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -Ispdlog -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/QtGui -IC:/msys64/mingw64/include/QtCore -I"C:/msys64/home/Gordon Getzinger/elmaven/build/tmp/logger" -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o "C:/msys64/home/Gordon Getzinger/elmaven/build/tmp/logger/elmavenlogger.o" elmavenlogger.cpp
In file included from spdlog/sinks/../details/log_msg.h:9,
                 from spdlog/sinks/sink.h:9,
                 from spdlog/sinks/base_sink.h:13,
                 from spdlog/logger.h:15,
                 from spdlog/spdlog.h:14,
                 from elmavenlogger.h:4,
                 from elmavenlogger.cpp:1:
spdlog/sinks/../details/../details/os.h: In function ‘void spdlog::details::os::prevent_child_fd(FILE*)’:
spdlog/sinks/../details/../details/os.h:163:15: error: ‘fileno’ was not declared in this scope
  163 |     auto fd = fileno(f);
      |               ^~~~~~
spdlog/sinks/../details/../details/os.h: In function ‘size_t spdlog::details::os::filesize(FILE*)’:
spdlog/sinks/../details/../details/os.h:248:14: error: ‘fileno’ was not declared in this scope
  248 |     int fd = fileno(f);
      |              ^~~~~~
In file included from spdlog/sinks/../details/log_msg.h:9,
                 from spdlog/sinks/sink.h:9,
                 from spdlog/sinks/base_sink.h:13,
                 from spdlog/logger.h:15,
                 from spdlog/spdlog.h:14,
                 from elmavenlogger.h:4,
                 from elmavenlogger.cpp:1:
spdlog/sinks/../details/../details/os.h: In function ‘std::string spdlog::details::os::errno_str(int)’:
spdlog/sinks/../details/../details/os.h:432:36: error: no matching function for call to ‘errno_to_string(char [256], fmt::internal::Null<>&)’
  432 |     return errno_to_string(buf, err); // use overloading to select correct stringify function
      |                                    ^
spdlog/sinks/../details/../details/os.h:393:20: note: candidate: ‘std::string spdlog::details::os::errno_to_string(char*, char*)’
  393 | inline std::string errno_to_string(char[256], char* res)
      |                    ^~~~~~~~~~~~~~~
spdlog/sinks/../details/../details/os.h:393:53: note:   no known conversion for argument 2 from ‘fmt::internal::Null<>’ to ‘char*’
  393 | inline std::string errno_to_string(char[256], char* res)
      |                                               ~~~~~~^~~
spdlog/sinks/../details/../details/os.h:398:20: note: candidate: ‘std::string spdlog::details::os::errno_to_string(char*, int)’
  398 | inline std::string errno_to_string(char buf[256], int res)
      |                    ^~~~~~~~~~~~~~~
spdlog/sinks/../details/../details/os.h:398:55: note:   no known conversion for argument 2 from ‘fmt::internal::Null<>’ to ‘int’
  398 | inline std::string errno_to_string(char buf[256], int res)
      |                                                   ~~~~^~~
spdlog/sinks/../details/../details/os.h: In function ‘bool spdlog::details::os::in_terminal(FILE*)’:
spdlog/sinks/../details/../details/os.h:485:19: error: ‘fileno’ was not declared in this scope; did you mean ‘file’?
  485 |     return isatty(fileno(file)) ? true : false;
      |                   ^~~~~~
      |                   file
make[3]: *** [Makefile.Release:153: C:/msys64/home/Gordon Getzinger/elmaven/build/tmp/logger/elmavenlogger.o] Error 1
make[3]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/Logger'
make[2]: *** [Makefile:45: release] Error 2
make[2]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty/Logger'
make[1]: *** [Makefile:318: sub-Logger-make_first-ordered] Error 2
make[1]: Leaving directory '/home/Gordon Getzinger/elmaven/ElMaven/3rdparty'
make: *** [Makefile:52: sub-3rdparty-make_first-ordered] Error 2
@ggetzinger ggetzinger changed the title Window build from source--error: ‘fileno’ was not declared in this scope Windows build from source--error: ‘fileno’ was not declared in this scope Aug 6, 2021
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

1 participant