Bug 16494 – cannot find source code for runtime library after brew install in custom directory

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2016-09-14T21:43:33Z
Last change time
2024-12-13T18:50:02Z
Assigned to
No Owner
Creator
Timothee Cour
Moved to GitHub: dmd#19188 →

Comments

Comment #0 by timothee.cour2 — 2016-09-14T21:43:33Z
When installing brew (via linuxbrew) in a nonstandard directory, dmd can't find it's config file. Would be nice if error message pointed out the algorithm to search for dmd.conf, and the best way to fix this install_dmd_custom.sh: ``` HOME_temp=/tmp/somedir/ HOME_old=$HOME mkdir -p $HOME_temp install_linuxbrew(){ HOME=$HOME_temp ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" HOME=$HOME_old } export HOMEBREW_PREFIX=$HOME_temp/.linuxbrew/ PATH="$HOMEBREW_PREFIX/bin:$PATH" ls $HOMEBREW_PREFIX/bin/brew || install_linuxbrew brew install dmd rdmd some_file.d #cannot find source code for runtime library after brew install in custom directory ``` dmd -v|grep Config: Config file: (null)
Comment #1 by timothee.cour2 — 2016-09-14T22:02:21Z
was caused by installing linuxbrew on a mounted directory, except that the $HOME variable was ran on another machine when installed the first time, and had a different value from the $HOME on the machine where it was run a 2nd time. What's weird is that the dmd.conf file existed at the correct location but DFLAGS defined there were wrong (pointing to old home); not sure why dmd -v|grep Config would return Config file: (null) in that case cat $HOMEBREW_PREFIX/etc/dmd.conf [Environment] DFLAGS=-I/home/old_name/.linuxbrew/Cellar/dmd/2.071.1/include/dlang/dmd -L-L/home/old_name/.linuxbrew/Cellar/dmd/2.07 1.1/lib
Comment #2 by robert.schadek — 2024-12-13T18:50:02Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19188 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB