EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: undefined symbols in windows build
From: "Hill, Jeff" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 19 Nov 2013 19:11:35 +0000
FWIW, I see some undefined symbols early in the build when building R3.15 native for windows with both mingw and also MS compilers. See below.

C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:102: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:103: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:110: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:114: undefined reference to `_imp__fdmgr_init@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:116: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:124: undefined reference to `_imp__epicsSocketCreate@12'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:127: undefined reference to `_imp__epicsSocketConvertErrnoToString'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:128: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:132: undefined reference to `_imp__epicsSocketEnableAddressReuseDuringTimeWait
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:145: undefined reference to `_imp__epicsSocketConvertErrnoToString'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:146: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:147: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:157: undefined reference to `_imp__epicsSocketConvertErrnoToString'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:158: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:173: undefined reference to `_imp__epicsSocketConvertErrnoToString'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:174: undefined reference to `_imp__epicsGetStderr@0'
C:\hill\epicsInBazaar\epicsR3.15-atomics-small-fixes\trunk\src\libCom\O.win32-x86-mingw/../../../src/libCom/log/iocLogServer.c:187: undefined reference to `_imp__epicsGetStderr@0'

cl -EHsc -GR               -nologo -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE   -RTCsu -Zi   -W3 -w44355       -MDd -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -TP  -I. -I../O.Common -I. -I../../../src/libCom/osi/com
piler/msvc -I../../../src/libCom/osi/compiler/default -I. -I../../../src/libCom/osi/os/WIN32 -I../../../src/libCom/osi/os/default -I.. -I../../../src/libCom/as -I../../../src/libCom/bucketLib -I../../../src/libCom/calc -I../../../sr
c/libCom/cvtFast -I../../../src/libCom/cppStd -I../../../src/libCom/cxxTemplates -I../../../src/libCom/dbmf -I../../../src/libCom/ellLib -I../../../src/libCom/env -I../../../src/libCom/error -I../../../src/libCom/fdmgr -I../../../sr
c/libCom/flex -I../../../src/libCom/freeList -I../../../src/libCom/gpHash -I../../../src/libCom/iocsh -I../../../src/libCom/log -I../../../src/libCom/macLib -I../../../src/libCom/misc -I../../../src/libCom/osi -I../../../src/libCom/
ring -I../../../src/libCom/taskwd -I../../../src/libCom/timer -I../../../src/libCom/yacc -I../../../src/libCom/yacc -I../../../src/libCom/yajl -I../../../include/compiler/msvc -I../../../include/os/WIN32 -I../../../include        -c
 ../../../src/libCom/osi/os/WIN32/forceBadAllocException.cpp
forceBadAllocException.cpp
rc -l 0x409 -I. -I../O.Common -I. -I../../../src/libCom/osi/compiler/msvc -I../../../src/libCom/osi/compiler/default -I. -I../../../src/libCom/osi/os/WIN32 -I../../../src/libCom/osi/os/default -I.. -I../../../src/libCom/as -I../../.
./src/libCom/bucketLib -I../../../src/libCom/calc -I../../../src/libCom/cvtFast -I../../../src/libCom/cppStd -I../../../src/libCom/cxxTemplates -I../../../src/libCom/dbmf -I../../../src/libCom/ellLib -I../../../src/libCom/env -I../.
./../src/libCom/error -I../../../src/libCom/fdmgr -I../../../src/libCom/flex -I../../../src/libCom/freeList -I../../../src/libCom/gpHash -I../../../src/libCom/iocsh -I../../../src/libCom/log -I../../../src/libCom/macLib -I../../../s
rc/libCom/misc -I../../../src/libCom/osi -I../../../src/libCom/ring -I../../../src/libCom/taskwd -I../../../src/libCom/timer -I../../../src/libCom/yacc -I../../../src/libCom/yacc -I../../../src/libCom/yajl -I../../../include/compile
r/msvc -I../../../include/os/WIN32 -I../../../include        -fo Com.res ../Com.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation.  All rights reserved.

link -nologo -subsystem:windows -dll -debug -incremental:no -fixed:no    -out:Com.dll -implib:Com.lib
LINK : warning LNK4001: no object files specified; libraries used
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
Com.dll : fatal error LNK1120: 1 unresolved externals

> -----Original Message-----
> From: Hill, Jeff
> Sent: Monday, November 18, 2013 4:58 PM
> To: 'Anderson, Janet B.'
> Subject: RE: cmd.exe build
> 
> 
> FWIW, of course the correct solution is to set the SHELL environment variable
> to cmd.exe in the setup dos script for MS and mingw, dos based shell, builds.
> This appears to be required only if you have msys in the path (to use ls and
> other unix like commands in cmd.exe shell). Perhaps I am the only one that
> does that. Another option now would be to just use bash on windows.
> 
> Jeff
> 
> > -----Original Message-----
> > From: Hill, Jeff
> > Sent: Thursday, November 14, 2013 7:49 PM
> > To: 'Anderson, Janet B.'
> > Subject: RE: cmd.exe build
> >
> > Hi,
> >
> > > I guess I don't have the shell problems that
> > > you encountered when building base with mingw compilers  because I
> don't
> > > have MSYS installed and I don't have cygwin in my path when executing
> the
> > > mingw builds.
> >
> > I also don't have Cygwin in the path, but I suspect that MSYS provides some
> > kind of unix like shell. The MSYS is nice though because I can type ls etc.
> > Maybe I should just use the UNIX shell.
> >
> > I suppose the root issue here is that the build shell is a user preference, and
> > not an architecture specific thing?
> >
> > Also, I don't know how the gnu make starts with cmd.exe and then later
> > switches to a different shell? Does it start with csh and later switch to bash
> on
> > linux? I doubt it. Maybe this is some kind of bug in the mingw make.
> >
> > I notice also that realpath gnu make function maybe is strange on windows.
> > That's too bad because I don't know how to get the build system to spit out
> > absolute paths so we can click on the error messages in the IDE.
> >
> > > P.S.  I decided to stick around Argonne for a little while longer.
> >
> > No doubt we will benefit, but maybe you will prefer not to compete with
> > Marty in this area :-)
> >
> > This weekend I am driving to LA because my son is running at regionals for
> > UCSC, so I won`t be in on Friday.
> >
> > Jeff
> >
> > > -----Original Message-----
> > > From: Anderson, Janet B. [mailto:[email protected]]
> > > Sent: Thursday, November 14, 2013 4:08 PM
> > > To: Hill, Jeff
> > > Subject: RE: cmd.exe build
> > >
> > > Hi Jeff,
> > >
> > > Sorry for the delay in answering.   I guess I don't have the shell problems
> > that
> > > you encountered when building base with mingw compilers  because I
> don't
> > > have MSYS installed and I don't have cygwin in my path when executing
> the
> > > mingw builds.  I am using the same version of make as you are but it is a
> > > directory with no other executables.  The mingw compilers on my pc are
> > also
> > > in a directory with no other tools.   I guess I must have downloaded them
> > > separately. Maybe you could commit the change in a CONFIG_SITE file so
> it
> > > could easily be commented out if not needed by some users.
> > >
> > > Note, I will be on vacation all next week.  It seems like Andrew always
> > decides
> > > to build a new release, when I am on vacation.
> > >
> > > Janet
> > >
> > > P.S.  I decided to stick around Argonne for a little while longer.
> > >
> > >
> > > ________________________________________
> > > From: Hill, Jeff [[email protected]]
> > > Sent: Wednesday, November 06, 2013 11:39 AM
> > > To: Anderson, Janet B.
> > > Subject: cmd.exe build
> > >
> > > Hi Janet,
> > >
> > > I notice that the Microsoft shell (cmd.exe) initiated mingw and ms win32-
> > x86
> > > build fails if I don't add the following to CONFIG.win32-x86-
> mingw.Common
> > > and CONFIG.win32-x86.Common.
> > >
> > > SHELL = cmd.exe
> > >
> > > The error message looks like this.
> > >
> > > ..\\..\\..\\bin\\win32-x86-mingw\\e_flex.exe -
> S../../../include/flex.skel.static
> > -8
> > > -I -t ../../../src/libCom/as/asLib_lex.l > asLib_lex.yy.c
> > > /usr/bin/sh: ......binwin32-x86-mingwe_flex.exe: command not found
> > >
> > > I have msys in the path (for unix like commands), and this may be causing
> > > make to find "/usr/bin/sh" and use it instead. See the error message
> above.
> > > Perhaps make is supposed to continue using the shell that it started with,
> > but
> > > maybe that isn't how it works.
> > >
> > > I am using this version of make.
> > >
> > > >mingw32-make --version
> > > GNU Make 3.82
> > > Built for i386-pc-mingw32
> > > Copyright (C) 2010  Free Software Foundation, Inc.
> > > License GPLv3+: GNU GPL version 3 or later
> > > <http://gnu.org/licenses/gpl.html>
> > > This is free software: you are free to change and redistribute it.
> > > There is NO WARRANTY, to the extent permitted by law.
> > >
> > > I don't know if this change is a good idea, but in any case it's an
> observation.
> > > Maybe the windows native build should work both when initiated form
> > > cmd.exe and also when initiated from /usr/bin/sh? Is the build under the
> > > Microsoft shell still supported. Maybe the msys shell is sufficient now; I
> > don't
> > > know?
> > >
> > > PS:
> > >
> > > I heard that you were considering some options for retirement. Thanks for
> > all
> > > of your help, and enhancements to EPICS, over the years. I very much
> > > enjoyed, and benefited, from working with you!
> > >
> > > Best wishes for a long and happy retirement, if you choose that option!
> > >
> > > Jeff


Replies:
Re: undefined symbols in windows build Andrew Johnson

Navigate by Date:
Prev: Build failed in Jenkins: epics-base-3.15 #28 APS Jenkins
Next: Re: undefined symbols in windows build Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Base 3.14.12.4 Release Timetable Andrew Johnson
Next: Re: undefined symbols in windows build Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 19 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·