Greetings. I am an EGSnrc user since 2005. I am having issues compiling a fresh Installation of egs_brachy on my Windows 10 pc:
Windows 10 HOME 64bit 1709
gfortran 7.2.0 (MinGW-W64)
gcc 7.2.0 (MinGW-W64)
g++ 7.2.0 (MinGW-W64)
GNU Make 4.2.1 (mingw32-make)
Have you been able to find a solution to this Problem? I shall be grateful if you could assist.
g++ -Wall -Wno-sign-compare -I. -I.gzstream -IC:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSElibwin6432 -IC:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEegs++ -IC:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEegs++geometry -IC:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEinterface -IC:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEiaea_phsp -I.zlib -DWIN32 -O3 -ffast-math -c -o egs_brachy_win6432.o egs_brachy.cpp
process_begin: CreateProcess(NULL, uname, …) failed.
mingw32-make: Makefile:51: pipe: No error
process_begin: CreateProcess(NULL, uname, …) failed.
mingw32-make: Makefile:89: pipe: No error
In file included from C:/Program Files/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/x86_64-w64-mingw32/include/winnt.h:9:0,
from C:/Program Files/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
from C:/Program Files/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/x86_64-w64-mingw32/include/windef.h:8,
from C:/Program Files/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/x86_64-w64-mingw32/include/windows.h:69,
from C:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSElibwin6432/egs_config1.h:36,
from C:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEegs++/egs_libconfig.h:54,
from C:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEegs++/egs_advanced_application.h:42,
from egs_brachy.h:54,
from egs_brachy.cpp:52:
pubsub.h:69:32: error: ‘typedef struct std::pair SendMessageA’ redeclared as different kind of symbol
typedef pair SendMessage;
^
In file included from C:/Program Files/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/x86_64-w64-mingw32/include/windows.h:72:0,
from C:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSElibwin6432/egs_config1.h:36,
from C:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEegs++/egs_libconfig.h:54,
from C:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEegs++/egs_advanced_application.h:42,
from egs_brachy.h:54,
from egs_brachy.cpp:52:
C:/Program Files/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/x86_64-w64-mingw32/include/winuser.h:1980:29: note: previous declaration ‘LRESULT SendMessageA(HWND, UINT, WPARAM, LPARAM)’
WINUSERAPI LRESULT WINAPI SendMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
^~~~~~~~~~~~
egs_brachy.cpp: In member function ‘virtual int EB_Application::ausgab(int)’:
egs_brachy.cpp:1480:17: error: expected ‘;’ before ‘send_messages’
SendMessage send_messages[] = {
^~~~~~~~~~~~~
egs_brachy.cpp:1487:6: warning: statement is a reference, not call, to function ‘SendMessageA’ [-Waddress]
};
^
egs_brachy.cpp:1487:6: warning: statement has no effect [-Wunused-value]
egs_brachy.cpp:1488:24: error: ‘send_messages’ was not declared in this scope
int nmesg = sizeof(send_messages)/sizeof(send_messages[0]);
^~~~~~~~~~~~~
egs_brachy.cpp:1488:24: note: suggested alternative: ‘SendMessageW’
int nmesg = sizeof(send_messages)/sizeof(send_messages[0]);
^~~~~~~~~~~~~
SendMessageW
egs_brachy.cpp:1468:10: warning: unused variable ‘escaping_source’ [-Wunused-variable]
bool escaping_source = leaving_source && !latch_control.hasEscaped(&top_p);
^~~~~~~~~~~~~~~
egs_brachy.cpp:1474:10: warning: unused variable ‘escaping_geom’ [-Wunused-variable]
bool escaping_geom = is_before_transport && irnew < 0;
^~~~~~~~~~~~~
mingw32-make: * [C:EGSnrc-2017EGSnrc_with_egs_brachyHEN_HOUSEmakefilescpp_makefile:78: egs_brachy_win6432.o] Error 1
ExitCode = 2
*********************** finished ***************************
Marc Chamberland
LikeLike
Mark Chofor Hi, this looks like some incompatibility between the compiler and the egs_brachy code. Any chance you can try a different compiler? Unfortunately, I don’t have access to a Windows system to investigate this right now.
LikeLike
I’ve opened an issue on the egs_brachy repo, but I’m not sure we have the resources to look into this. On the plus side, the code is open source, so if a Windows power user wants to look into it… 😉
LikeLike
Mark Chofor unfortunately the CLRP group can only officially support egs_brachy on Linux for now. That said, from that traceback I’m wondering if the SendMessage type is conflicting with another type on your system. If you’re up for it (sorry I don’t have a Windows machine) can you try editing egs_brachy.cpp & pubsub.h and replace every instance of SendMessage with e.g. EBSendMessage and recompiling? All the spots that should need to be changed are:
./egs_brachy.cpp:1480: SendMessage send_messages[] = {
./egs_brachy.cpp:1481: SendMessage(is_before_transport, PARTICLE_TAKING_STEP),
./egs_brachy.cpp:1482: SendMessage(is_after_transport, PARTICLE_TOOK_STEP),
./egs_brachy.cpp:1483: SendMessage(escaping_source, PARTICLE_ESCAPING_SOURCE),
./egs_brachy.cpp:1484: SendMessage(escaped_source, PARTICLE_ESCAPED_SOURCE),
./egs_brachy.cpp:1485: SendMessage(escaping_geom, PARTICLE_ESCAPING_GEOM),
./egs_brachy.cpp:1486: SendMessage(escaped_geom, PARTICLE_ESCAPED_GEOM)
./pubsub.h:69:typedef pair SendMessage;
LikeLike
Thanks for your comments Marc Chamberland.
Randle Taylor your suggestion was quite helpfull and the compilation worked until I had the following errors in an attempt to create egs_brachy.exe:
“Mortran compiling EGSnrc sources …”
x86_64-w64-mingw32-gfortran -O3 -ffast-math -c -o egsnrc_win6432.o egsnrc_win6432.F
g++ -Wall -Wno-sign-compare -I. -I.\gzstream -IC:\EGSnrc-2017\EGSnrc_with_egs_brachy\HEN_HOUSE\lib\win6432 -IC:\EGSnrc-2017\EGSnrc_with_egs_brachy\HEN_HOUSE\egs++ -IC:\EGSnrc-2017\EGSnrc_with_egs_brachy\HEN_HOUSE\egs++\geometry -IC:\EGSnrc-2017\EGSnrc_with_egs_brachy\HEN_HOUSE\interface -IC:\EGSnrc-2017\EGSnrc_with_egs_brachy\HEN_HOUSE\iaea_phsp -I.\zlib -DWIN32 -O3 -ffast-math -DWIN32 -c -o egs_interface2_win6432.o C:\EGSnrc-2017\EGSnrc_with_egs_brachy\HEN_HOUSE\interface\egs_interface2.c
g++ -O3 -ffast-math -DWIN32 -o C:\EGSnrc-2017\EGSnrc_with_egs_brachy\EGS_HOME\bin\win6432\egs_brachy.exe egs_brachy_win6432.o phantom_win6432.o eb_volcor_win6432.o latch_win6432.o spec_scoring_win6432.o pubsub_win6432.o ginfo_win6432.o recycle_win6432.o phsp_win6432.o gzstream_win6432.o egs_advanced_application_win6432.o egsnrc_win6432.o egs_interface2_win6432.o -LC:\EGSnrc-2017\EGSnrc_with_egs_brachy\HEN_HOUSE\egs++\dso\win6432 -legspp -lgfortran -legs_autoenvelope -liaea_phsp -lz
eb_volcor_win6432.o:eb_volcor.cpp:(.text+0xdec): undefined reference to `sobol::tau_sobol(int)’
eb_volcor_win6432.o:eb_volcor.cpp:(.text+0xe00): undefined reference to `EGS_Sobol::setState(int, long long)’
eb_volcor_win6432.o:eb_volcor.cpp:(.text+0xfbf): undefined reference to `EGS_Sobol::setState(int, long long)’
eb_volcor_win6432.o:eb_volcor.cpp:(.text+0xfd5): undefined reference to `sobol::tau_sobol(int)’
eb_volcor_win6432.o:eb_volcor.cpp:(.rdata$.refptr._ZTV9EGS_Sobol[.refptr._ZTV9EGS_Sobol]+0x0): undefined reference to `vtable for EGS_Sobol’
collect2.exe: error: ld returned 1 exit status
mingw32-make: * [C:\EGSnrc-2017\EGSnrc_with_egs_brachy\HEN_HOUSE\makefiles\cpp_makefile:44: C:\EGSnrc-2017\EGSnrc_with_egs_brachy\EGS_HOME\bin\win6432\egs_brachy.exe] Error 1
ExitCode = 2
*********************** finished ***************************
Maybe this might be a trivial issue. What could have gone wrong? Thanks for the tips!
LikeLike
I’m not sure but it looks like the Sobol RNG (included with egs_autoenvelope) might not have been compiled. If you go to $HEN_HOUSE\egs++\geometry\egs_autoenvelope and do `make clean` and then `make` it should compile the Sobol RNG and you can try compiling egs_brachy again.
LikeLike
Do you need the gui’s? If not I’ve had great luck using the windows subsystem for linux. If you do need the gui’s there are ways around it but it goes a bit beyond install windows subsystem for linux (msdn has a great article) and follow the linux instructions (WSL is ubuntu)
LikeLike