www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - GCC-compatible dmd shell wrapper?

reply Shriramana Sharma <samjnaa_dont_spam_me gmail.com> writes:
dmd's command-line argument parsing is different from that of gcc/clang. Of 
course I can use ldc or gdc but as I want to stay with latest improvements I 
would prefer to use dmd, but I'm having to readapt my habit every time I 
want to compile a D program. Has anyone written a thin shell wrapper 
(running Kubuntu Trusty LTS here) for dmd?

Thanks!

-- 

Oct 16 2015
parent reply Daniel Kozak <kozzi dlang.cz> writes:
Shriramana Sharma p=C3=AD=C5=A1e v P=C3=A1 16. 10. 2015 v 17:51 +0530:
 dmd's command-line argument parsing is different from that of
 gcc/clang. Of=20
 course I can use ldc or gdc but as I want to stay with latest
 improvements I=20
 would prefer to use dmd, but I'm having to readapt my habit every
 time I=20
 want to compile a D program. Has anyone written a thin shell wrapper=20
 (running Kubuntu Trusty LTS here) for dmd?
=20
 Thanks!
=20
dmd, gdmd, ldmd2
Oct 16 2015
next sibling parent Daniel Kozak <kozzi dlang.cz> writes:
Daniel Kozak p=C3=AD=C5=A1e v P=C3=A1 16. 10. 2015 v 15:46 +0200:
 Shriramana Sharma p=C3=AD=C5=A1e v P=C3=A1 16. 10. 2015 v 17:51 +0530:
 dmd's command-line argument parsing is different from that of
 gcc/clang. Of=20
 course I can use ldc or gdc but as I want to stay with latest
 improvements I=20
 would prefer to use dmd, but I'm having to readapt my habit every
 time I=20
 want to compile a D program. Has anyone written a thin shell
 wrapper=20
 (running Kubuntu Trusty LTS here) for dmd?
=20
 Thanks!
=20
=20 dmd, gdmd, ldmd2
Oh I see now, you dont look for universal D way, but something same as clang or gcc
Oct 16 2015
prev sibling parent reply Shriramana Sharma <samjnaa_dont_spam_me gmail.com> writes:
Daniel Kozak wrote:

 dmd, gdmd, ldmd2
Excuse me -- I don't understand what you mean. I was asking if anyone had written a shell wrapper for dmd to accept standard GCC/Clang-like syntax for input files etc. I am particularly missing the -o option. No big deal, guess can do it myself... I previously had some serious problems with GDC so never tried that ever again, but dmd, ldmd2 and ldc2 all generally have the same syntax, esp. w.r.t missing -o... --
Oct 16 2015
parent reply Iain Buclaw via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 16 October 2015 at 15:49, Shriramana Sharma via Digitalmars-d <
digitalmars-d puremagic.com> wrote:

 Daniel Kozak wrote:

 dmd, gdmd, ldmd2
Excuse me -- I don't understand what you mean. I was asking if anyone had written a shell wrapper for dmd to accept standard GCC/Clang-like syntax for input files etc. I am particularly missing the -o option. No big deal, guess can do it myself... I previously had some serious problems with GDC so never tried that ever again, but dmd, ldmd2 and ldc2 all generally have the same syntax, esp. w.r.t missing -o...
Where's the bug report?
Oct 16 2015
next sibling parent Shriramana Sharma <samjnaa_dont_spam_me gmail.com> writes:
Iain Buclaw via Digitalmars-d wrote:

 I previously had some serious problems with GDC so never tried that ever
 again, but dmd, ldmd2 and ldc2 all generally have the same syntax, esp.
 w.r.t missing -o...
Where's the bug report?
Sorry I don't think I filed one. It was quite some time back. It was like after once installing GDC, I couldn't ever install DMD again and have it work. Maybe I posted about that here on the forum, but I don't remember. I'm not sure I would care to try to reproduce that since last time I was only able to reinstall DMD after a complete re-install of my Kubuntu system (a la Windows, yikes – never had to do that for *any* other Linux-based program!). Besides, my post wasn't intended to deride GDC in any way... It's just that for C/C++ I already moved to Clang totally, so not too interested in GCC- based compilers. I realize you are putting a lot of effort into GDC, but well it's just that I'm not looking into it. Sorry again... --
Oct 16 2015
prev sibling parent reply Shriramana Sharma <samjnaa_dont_spam_me gmail.com> writes:
Iain Buclaw via Digitalmars-d wrote:

 I previously had some serious problems with GDC so never tried that ever
 again, but dmd, ldmd2 and ldc2 all generally have the same syntax, esp.
 w.r.t missing -o...
Where's the bug report?
http://forum.dlang.org/post/mailman.572.1370073456.13711.digitalmars-d-learn puremagic.com http://forum.dlang.org/post/mailman.573.1370076049.13711.digitalmars-d-learn puremagic.com Both dated 2013-Jun-01. The initial post I started that thread with was on the previous day: http://forum.dlang.org/post/mailman.520.1370020486.13711.digitalmars-d-learn puremagic.com And I had even provided a stacktrace at: http://forum.dlang.org/post/mailman.551.1370044498.13711.digitalmars-d-learn puremagic.com Now I'm scared off of even installing gdc on my system, sorry! --
Oct 17 2015
parent Iain Buclaw via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 17 Oct 2015 11:50 am, "Shriramana Sharma via Digitalmars-d" <
digitalmars-d puremagic.com> wrote:
 Iain Buclaw via Digitalmars-d wrote:

 I previously had some serious problems with GDC so never tried that
ever
 again, but dmd, ldmd2 and ldc2 all generally have the same syntax, esp.
 w.r.t missing -o...
Where's the bug report?
http://forum.dlang.org/post/mailman.572.1370073456.13711.digitalmars-d-learn puremagic.com

http://forum.dlang.org/post/mailman.573.1370076049.13711.digitalmars-d-learn puremagic.com
 Both dated 2013-Jun-01.

 The initial post I started that thread with was on the previous day:
http://forum.dlang.org/post/mailman.520.1370020486.13711.digitalmars-d-learn puremagic.com
 And I had even provided a stacktrace at:
http://forum.dlang.org/post/mailman.551.1370044498.13711.digitalmars-d-learn puremagic.com
 Now I'm scared off of even installing gdc on my system, sorry!

 --

Looking at that backtrace I can only speculate. Segfault in dso registry - how stable was dmd's shared library support back then? If you are certain that it only started segfaulting after installing gdc-4.6, the only other case to speculate is what was the default gcc version? I can't see having two versions of gcc installed being a problem - as what would have undoubtedly happened if the defaults-gcc package was 4.7 or later, but I question how dmd did it's linking back then. It used to call gcc, but now calls ld directly now though, right? In any case, dmd shared library support, or linking against a unsupported C runtime, had the person asked you to run ldd against the broken binary, probably would have guessed one or the other. In any case neither directly relate to each other - different library names different module paths - so I still have doubts over your claims. The most common reason I'm aware of is having two versions of dmd installed. But if you are unfamiliar with a package system you always seem to find ways to break it that don't make much sense. That's the long answer for "You should not be able to reproduce your problem should you do the same again, and if you do, I'd eat my hat". Iain.
Oct 17 2015