Date: Sun, 16 Jul 2017 23:24:32 -0700 From: Cy Schubert <Cy.Schubert@komquats.com> To: acm@freebsd.org Cc: Cy Schubert <Cy.Schubert@komquats.com>, ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r445203 - head/lang/ldc Message-ID: <201707170624.v6H6OWZU067772@slippy.cwsent.com> In-Reply-To: Message from =?UTF-8?Q?Alonso_C=C3=A1rdenas_M=C3=A1rquez?= <acm@freebsd.org> of "Sun, 16 Jul 2017 13:57:57 -0500." <CAEpPhT%2BC1AXWDuQH2xxy5RdfJdEhHFpr8xbKbEjc2KvoZd5GDQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <CAEpPhT+C1AXWDuQH2xxy5RdfJdEhHFpr8xbKbEjc2KvoZd5GDQ@mail.gmail.c om> , =?UTF-8?Q?Alonso_C=C3=A1rdenas_M=C3=A1rquez?= writes: > --001a113d46aa525165055473dcc5 > Content-Type: text/plain; charset="UTF-8" > > 2017-07-07 1:38 GMT-05:00 Cy Schubert <Cy.Schubert@komquats.com>: > > > > > > > Interestingly I'm seeing the same issue with lang/dmd2. I've determined > > that dmd2's issue is stack corruption caused incorrect D stat_t and > > dirent_t definitions. I'm willing to bet that ldc, which is based on DMD D > > (with an llvm backend), likely has the same issue. > > > > Hi, you are right. lang/ldc is broken on 12-CURRENT. I think that some > changes into 12-CURRENT is breaking some ports It's inode64 that broke this port and dmd2. The workaround implemented by kib@ should be sufficient however the two D ports developers have implemented virtually everything in D, requiring manual translation of certain data structures from C header files to D header files. The nuances (conditional compilation) of our and other operating systems' definition of data structures is not captured by their definitions making their implementation fragile. > > > > I've opened a ticket with dlang.org. The issue is that for lang/dmd2 and > > lang/ldc to support pre-inode64 and post-inode64 systems we must be able to > > conditionally include old and new versions of stat and dirent structs. > > Unfortunately D only supports a version() statement (akin an #ifdef) and D > > supports version(FreeBSD) and is not able to conditionally compile based on > > __FreeBSD_version. (It would have been simpler had they used simple stubs > > to interface with the O/S. <sigh> ) > > > > I think our todo in both cases will be: > > > > 1. See if our upline can support a version() statement that can be used to > > compare against __FreeBSD_version or failing that a major.minor version > > number, or > > > > 2. Replacing the direct D calls of stat() and fstat() with calls to a stub > > written in C or C++. This too can only be sustainably provided by our > > upline. > > > > 3. Failing 1 and 2 above, the makefile changes and patches to both ports > > will be inelegant hacks at best. > > > > I'll be checking for your bug report ( > https://issues.dlang.org/show_bug.cgi?id=17596. Maybe they implement > version feature before of 12-RELEASE. Btw I think 3 is the best option > currently. In the interim, yes, however in the long term dlang.org should consider the other options. I've opened a ticket with dlang.org and am working with them to resolve this. Their implementation is certainly not easily portable. -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707170624.v6H6OWZU067772>