Skip to content

data-files with --prefix is inconsistent between Windows and Linux #3305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ezyang opened this issue Apr 9, 2016 · 0 comments
Open

data-files with --prefix is inconsistent between Windows and Linux #3305

ezyang opened this issue Apr 9, 2016 · 0 comments

Comments

@ezyang
Copy link
Contributor

ezyang commented Apr 9, 2016

I tried reading #462 and #459 but I could not decipher what was going on in the bug discussion. So here is a report of my own. It appears that the behavior of Paths getDataFile when --prefix is passed is inconsistent between Linux and Windows, in the following way:

Suppose I build but do not install an executable dist/build/myexe/myexe, configured using --prefix=/usr to be installed into usr, which attempts to retrieve a data file. When I run this executable on Linux, it will attempt to retrieve the data file from the directory /usr/share/ARCH-linux-ghc-VERSION/packagename-VERSION. However, on Windows, it will attempt to retrieve the data file from the directory dist/build/ARCH-windows-ghc-VERSION\packagename-VERSION.

The Windows behavior is especially puzzling, because I don't believe we ever install libraries at the location we're probing. Looking at the source code, it appears that in the Windows case, --prefix is still triggering some sort of "relocatable" behavior (not --enable-relocatable, which is something different, but the codepath that occurs when reloc and absolute are false) which is causing it to be doing something different. It is very puzzling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants