1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 <2025> | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 <2025> |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: FYI, the msys2 compilation approach is not working |
From: | Freddie Akeroyd - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Wang, Andrew" <wang126 at llnl.gov>, EPICS tech-talk <tech-talk at aps.anl.gov> |
Date: | Mon, 28 Apr 2025 17:12:50 +0000 |
Hi, The windows-x64 target is only for a visual studio windows build, windows-x64-mingw is correct for MinGW. Can you just check that you ran this build from a “MSYS2 MinGW 64bit” window rather than
a “MSYS2 MSYS” terminal. What does gcc -v Show? Regards, Freddie From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Wang, Andrew via Tech-talk Hi all, I’m following the instructions on this
webpage for installing EPICS using msys2. Everything worked fine up until the “Download and build EPICS Base” section. After running “export EPICS_HOST_ARCH=windows-x64-mingw”, I get the following errors. Do you suggest that I potentially
change the architecture to windows-x64, rather than windows-x64-mingw? ../osi/os/WIN32/epicsTempFile.c: In function ‘epicsTempFile’: ../osi/os/WIN32/epicsTempFile.c:31:20: warning: implicit declaration of function ‘_tempnam’; did you mean ‘tempnam’? [-Wimplicit-function-declaration] 31 | char * pName = _tempnam("c:\\tmp", "epics"); | ^~~~~~~~ | tempnam ../osi/os/WIN32/epicsTempFile.c:31:20: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] ../osi/os/WIN32/epicsTempFile.c:45:24: error: ‘_O_CREAT’ undeclared (first use in this function); did you mean ‘O_CREAT’? 45 | int openFlag = _O_CREAT | _O_EXCL | _O_RDWR | | ^~~~~~~~ | O_CREAT ../osi/os/WIN32/epicsTempFile.c:45:24: note: each undeclared identifier is reported only once for each function it appears in ../osi/os/WIN32/epicsTempFile.c:45:35: error: ‘_O_EXCL’ undeclared (first use in this function); did you mean ‘O_EXCL’? 45 | int openFlag = _O_CREAT | _O_EXCL | _O_RDWR | | ^~~~~~~ | O_EXCL ../osi/os/WIN32/epicsTempFile.c:45:45: error: ‘_O_RDWR’ undeclared (first use in this function); did you mean ‘O_RDWR’? 45 | int openFlag = _O_CREAT | _O_EXCL | _O_RDWR | | ^~~~~~~ | O_RDWR ../osi/os/WIN32/epicsTempFile.c:46:13: error: ‘_O_SHORT_LIVED’ undeclared (first use in this function) 46 | _O_SHORT_LIVED | _O_BINARY | _O_TEMPORARY; | ^~~~~~~~~~~~~~ ../osi/os/WIN32/epicsTempFile.c:46:30: error: ‘_O_BINARY’ undeclared (first use in this function); did you mean ‘O_BINARY’? 46 | _O_SHORT_LIVED | _O_BINARY | _O_TEMPORARY; | ^~~~~~~~~ | O_BINARY ../osi/os/WIN32/epicsTempFile.c:46:42: error: ‘_O_TEMPORARY’ undeclared (first use in this function) 46 | _O_SHORT_LIVED | _O_BINARY | _O_TEMPORARY; | ^~~~~~~~~~~~ ../osi/os/WIN32/epicsTempFile.c:47:40: error: ‘_S_IWRITE’ undeclared (first use in this function); did you mean ‘S_IWRITE’? 47 | int fd = open(pName, openFlag, _S_IWRITE); | ^~~~~~~~~ | S_IWRITE ../osi/os/WIN32/epicsTempFile.c:50:24: warning: implicit declaration of function ‘_fdopen’; did you mean ‘fdopen’? [-Wimplicit-function-declaration] 50 | pNewFile = _fdopen(fd, "w+b"); | ^~~~~~~ | fdopen ../osi/os/WIN32/epicsTempFile.c:50:22: warning: assignment to ‘FILE *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 50 | pNewFile = _fdopen(fd, "w+b"); | ^ gcc -D_MINGW -D__USE_MINGW_ANSI_STDIO -O3 -Wall -m64 -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -I. -I../O.Common -I. -I../osi/compiler/gcc -I../osi/compiler/default -I. -I../osi/os/WIN32
-I../osi/os/default -I.. -I../as -I../bucketLib -I../calc -I../cvtFast -I../cppStd -I../cxxTemplates -I../dbmf -I../ellLib -I../env -I../error -I../fdmgr -I../flex -I../freeList -I../gpHash -I../iocsh -I../log -I../macLib -I../misc -I../osi -I../pool -I../ring
-I../taskwd -I../timer -I../yacc -I../yacc -I../yajl -I../../../../include/compiler/gcc -I../../../../include/os/WIN32 -I../../../../include -o ccl.obj -c ../flex/ccl.c In file included from ../flex/flexdef.h:38, from ../flex/ccl.c:29: ../osi/os/WIN32/osiUnistd.h:16:10: fatal error: direct.h: No such file or directory 16 | #include <direct.h> | ^~~~~~~~~~ compilation terminated. make[4]: *** No rule to make target 'ccl.obj', needed by 'e_flex.exe'. Stop. make[4]: Leaving directory '/c/Users/wang126/base-R7.0.4.1/modules/libcom/src/O.windows-x64-mingw' make[3]: *** [../../../configure/RULES_ARCHS:58: install.windows-x64-mingw] Error 2 make[3]: Leaving directory '/c/Users/wang126/base-R7.0.4.1/modules/libcom/src' make[2]: *** [../../configure/RULES_DIRS:85: src.install] Error 2 make[2]: Leaving directory '/c/Users/wang126/base-R7.0.4.1/modules/libcom' make[1]: *** [../configure/RULES_DIRS:85: libcom.install] Error 2 make[1]: Leaving directory '/c/Users/wang126/base-R7.0.4.1/modules' make: *** [configure/RULES_DIRS:85: modules.install] Error 2 |