public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Testsuite breakages on Cygwin
@ 2017-03-10  6:35 Daniel Santos
  2017-03-10 11:19 ` Jonathan Wakely
  2017-03-10 17:23 ` Joseph Myers
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Santos @ 2017-03-10  6:35 UTC (permalink / raw)
  To: gcc; +Cc: Mike Stump, Rainer Orth, Kai Tietz, Dave Korn, JonY

Hello,

I've been trying to get some clean test results on Cygwin and have 
encountered a number of problems.  I've opened a report for the one I'm 
most concerned with 
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79867). When an executable 
is being loaded, Windows searches for dlls based upon a few silly 
ms-like rules (https://msdn.microsoft.com/en-us/library/7d83bc18.aspx), 
followed by the PATH environment variable.  LD_LIBRARY_PATH is only used 
in Cygwin when loading a dll at run-time via dlopen().  This means that 
ALL tests are performed by linking in the shared libs that are installed 
on the *system* and not those built in the bootstrap.  If the dll is not 
installed on the system then the test fails.  Example:

FAIL: gfortran.dg/coarray/sync_3.f90 -fcoarray=single  -O2   output 
pattern test, is 
D:/builds/head-test-moutline-x86_64-pc-cygwin/gcc/testsuite/gfortran/sync_3.exe: 
error while loading shared libraries: cyggfortran-4.dll: cannot open 
shared object file: No such file or directory

I've written a crude patch to fix this, but I'm still new to DejaGnu, 
the gcc testsuite, et. al., and I am quite daunted by a few things.  
First, gcc has some code for maintaining the (dynamic) library path in 
target-libpath.exp and DejaGnu does some of this in in 
/usr/share/dejagnu/config/unix.exp.  But gcc has two slightly differing 
copies of target-libpath.exp, under {gcc,libffi}/testsuite/lib.  Also, 
LD_LIBRARY_PATH and SHLIB_PATH are directly modified in a few other gcc 
tests.

So my questions are:

1. Why are there two slightly different target-libpath.exp files? (The 
libffi version looks like it has some code to address this Cygwin 
problem; I haven't tested that yet.)
2. Can they be consolidated?
3. Wouldn't it be better to move this logic up into DejaGnu and restrict 
gcc to using a black-box interface for modifying the environment?

Still being new to DejaGnu, I may not fully understand it's intended 
scope, but it seems like the place to manage the subtleties of various 
OSes.  Either way, having the logic scattered about makes maintenance ugly.

Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-13 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10  6:35 Testsuite breakages on Cygwin Daniel Santos
2017-03-10 11:19 ` Jonathan Wakely
2017-03-10 17:23 ` Joseph Myers
2017-03-13 14:57   ` Daniel Santos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).