EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: cross-compiling Base 7.0.6 for win32
From: Andrew Johnson via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Mon, 28 Mar 2022 14:17:35 -0500
I had a different error from modules/libcom when I attempted to cross-build the win32-x86-mingw target from my RHEL-7 box earlier:
epicsTime.obj:epicsTime.cpp:(.text+0xcc2): undefined reference to `_mkgmtime32'
That was without adding the dbghelp library (which didn't help that problem), but I'm probably using a much older version of MinGW and I wasn't building static binaries either. However a cross-build of the windows-x64-mingw target did succeed for me.

I'm fine with our adding dbghelp as Freddie suggests if it fixes Evan's issue.

- Andrew


On 3/25/22 7:05 PM, Freddie Akeroyd - STFC UKRI via Tech-talk wrote:

Hi Evan,

 

These functions are part of the “dbghelp” library that looks to be missing from your link line. I suspect that this library is needed in this case because it is a static build, for a shared (DLL) build it would have been linked into COM I expect. If you edit

 

    modules/libcom/test/Makefile

 

and change the PROD_SYS_LIBS_WIN32 line to be

 

PROD_SYS_LIBS_WIN32 += ws2_32 advapi32 user32 dbghelp    

 

Does that help?

 

Freddie

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Daykin, Evan via Tech-talk
Sent: 24 March 2022 18:55
To: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: cross-compiling Base 7.0.6 for win32

 

Hi Tech Talk,

 

I am attempting to build Base version 7.0.6, with “CROSS_COMPILER_TARGET_ARCHS=linux-x86_64-debug win32-x86-mingw” on Debian 11, kernel version 5.10.0-8-amd64. I am getting the following error:

 

/usr/bin/i686-w64-mingw32-g++ -o epicsTypesTest.exe -static -L/user/daykin/git/epics-base/lib/win32-x86-mingw       -m32   -static-libgcc -static-libstdc++         epicsTypesTest.o    -lCom  -lws2_32 -ladvapi32 -luser32    -lws2_32

/usr/bin/i686-w64-mingw32-ld: /user/daykin/git/epics-base/lib/win32-x86-mingw/Com.lib(osdFindAddr.o):osdFindAddr.c:(.text+0x7b): undefined reference to `_imp__SymFromAddr@20'

/usr/bin/i686-w64-mingw32-ld: /user/daykin/git/epics-base/lib/win32-x86-mingw/Com.lib(osdFindAddr.o):osdFindAddr.c:(.text+0xf1): undefined reference to `_imp__SymSetOptions@4'

/usr/bin/i686-w64-mingw32-ld: /user/daykin/git/epics-base/lib/win32-x86-mingw/Com.lib(osdFindAddr.o):osdFindAddr.c:(.text+0x118): undefined reference to `_imp__SymInitialize@12'

/usr/bin/i686-w64-mingw32-ld: /user/daykin/git/epics-base/lib/win32-x86-mingw/Com.lib(osdFindAddr.o):osdFindAddr.c:(.text+0x1bd): undefined reference to `_imp__SymGetLineFromAddr64@20'

collect2: error: ld returned 1 exit status

 

I suppose this has something to do with the win32 API, but I’m not sure what I’m doing wrong; I have every gcc-mingw* package installed.  Has anyone experienced this before?

 

Evan Daykin

Controls Engineer

Facility for Rare Isotope Beams

Michigan State University

640 South Shaw Lane

East Lansing, MI 48824, USA

Tel. 517-908-7678

Email: daykin at frib.msu.edu

cid:image002.jpg@01D07041.57B6D750

 

 

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. 


-- 
Complexity comes for free, Simplicity you have to work for.

References:
cross-compiling Base 7.0.6 for win32 Daykin, Evan via Tech-talk
RE: cross-compiling Base 7.0.6 for win32 Freddie Akeroyd - STFC UKRI via Tech-talk

Navigate by Date:
Prev: Re: motorRecord with phytron support: record send goto 0 command before reference is done Kevin Peterson via Tech-talk
Next: RE: cross-compiling Base 7.0.6 for win32 Daykin, Evan via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: RE: cross-compiling Base 7.0.6 for win32 Freddie Akeroyd - STFC UKRI via Tech-talk
Next: RE: cross-compiling Base 7.0.6 for win32 Daykin, Evan via Tech-talk
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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·