Skip to content

Comments

Fix Issue 2473, 10941 - Linux system install instructions incorrect#2306

Merged
dlang-bot merged 1 commit intodlang:masterfrom
wilzbach:fix-2473
Jul 4, 2018
Merged

Fix Issue 2473, 10941 - Linux system install instructions incorrect#2306
dlang-bot merged 1 commit intodlang:masterfrom
wilzbach:fix-2473

Conversation

@wilzbach
Copy link
Contributor

The dmd.html page needs serious work and apparentely it always has been like this since 2008!
I wasn't sure on the best way to fix this because the shipped dmd.conf looks like this:

[Environment32]
DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import -L-L%@P%/../lib32 -L--export-dynamic

[Environment64]
DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import -L-L%@P%/../lib64 -L--export-dynamic -fPIC

In other words, the shipped dmd.conf can't be simply copied to /etc/. This means we have the following solutions

a) just tell the user to add it to his PATH
b) advertise to use e.g. a symlink to /usr/bin/dmd
c) provide an alternative dmd.conf for copy/pasting to /etc/dmd.conf
d) provide a command to patch the shipped dmd.conf
e) suggest to move the entire folder to /usr/local and symlink dmd then
...

(the FreeBSD + MacOS sections of this need similar adjustments, but I left them for now until I know how to proceed here)

See also: #2290

@adamdruppe
Copy link
Contributor

I've been saying this for EVER. The correct linux install instructions are "unzip the tarball. use it in place". That stupid page has caused so many newbies so much unnecessary pain.

@quickfur
Copy link
Member

Using relative paths in the default dmd.conf makes no sense. We should just decide on a global path like /usr/bin, /usr/local/bin, or /opt/bin, and just hardcode that into dmd.conf. Either that, or provide an easy way for users to say "please install to directory xyz" and have the right version of dmd.conf automatically created and installed in the right place for them.

@wilzbach
Copy link
Contributor Author

@quickfur relative paths are necessary - otherwise you can't use the dmd binary without "installing" it, which is a major use case, e.g. the install script which is also used by Travis depends on this.

@adamdruppe
Copy link
Contributor

adamdruppe commented Mar 27, 2018

I wouldn't be a D user today if there was insistence on global paths. Relative paths in the config were (and still are, though nowadays I'd just fork it and fix it myself), believe it or not, THE #1 reason I chose Digital Mars back in the day. These compilers just worked while the competition wouldn't even start up.

@quickfur
Copy link
Member

You're right, I said that too brashly. Actually, even I myself rely on the relative paths. :-D Otherwise my current setup based on git master wouldn't even work. And you're right, too much reliance on global paths is bad (I tried installing two different versions of gcc side-by-side once... it scarred me for life. It's possible, no doubt, but involves black magic that mere mortals have no business dabbling in).

@quickfur
Copy link
Member

Perhaps a script for installing the correctly-fixed dmd.conf to /etc would be best.

Or just suggest all of the alternatives and let the user choose.

@adamdruppe
Copy link
Contributor

There's really no reason to put it in /etc at all. My preference is to just delete these insane instructions and replace them with the real options:

  • use the bash script. if it uses /etc, document it there so people know but they don't have to do it themselves.
  • use the distro packages. ditto
  • use the zip, explaining that it just works in place, no moving/copying necessary.

@quickfur
Copy link
Member

Sounds good to me.

@quickfur
Copy link
Member

Though I'd at least put a more detailed description of how installing to /etc works somewhere (not necessarily on this page), should the user prefer to do that. Well, it's more of a documentation of how it would work, rather than something the user would actually do. So that in case somebody screws up his installation, there's at least a google-able document describing how things actually work that he could use to troubleshoot whatever it is he did wrong.

@wilzbach
Copy link
Contributor Author

wilzbach commented Jun 8, 2018

My preference is to just delete these insane instructions and replace them with the real options:

The installation hint is already part of #2290

Though I'd at least put a more detailed description of how installing to /etc works somewhere

It already exists - just at the lower part at the document, because it isn't too important:

https://dlang.org/dmd-linux.html#dmd-conf

So anything I can still do here?

@wilzbach
Copy link
Contributor Author

wilzbach commented Jul 3, 2018

So anything I can still do here?

Ping.

@wilzbach wilzbach added the 72h no objection -> merge The PR will be merged if there are no objections raised. label Jul 3, 2018
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Auto-close Bugzilla Severity Description
2473 normal Linux system install instructions incorrect
10941 normal object.d not found when following Mac installation instructions

@dlang-bot dlang-bot merged commit f732ca1 into dlang:master Jul 4, 2018
@wilzbach wilzbach deleted the fix-2473 branch July 18, 2018 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

72h no objection -> merge The PR will be merged if there are no objections raised. auto-merge Bug Fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants