Idris-dev icon indicating copy to clipboard operation
Idris-dev copied to clipboard

Hardcoded /Users/edwin paths in Idris 1.1.1 MacOS distribution binary

Open machunter opened this issue 8 years ago • 4 comments

There seems o be some hardcoded paths in the library. The Hello.idr is a simple "Hello World" example from the book.

MacBook-Pro:idris$ idris Hello.idr -o Hello
clang: error: no such file or directory: 'Hello'
FAILURE: "gcc" ["-O2","-fwrapv","-fno-strict-overflow","-DHAS_PTHREAD","-DIDRIS_ENABLE_STATS","-I.","/var/folders/5l/c2sjjy3j70zd6kf1y3kndxy40000gn/T/idris16807282475249.c","-L/usr/local/share/x86_64-osx-ghc-7.10.3/idris-1.1.1/rts","-lidris_rts","-lpthread","-I/usr/local/share/x86_64-osx-ghc-7.10.3/idris-1.1.1/rts","-lm","-I.","-I/Users/edwin/.cabal/share/x86_64-osx-ghc-7.10.3/idris-1.1.1/libs/prelude","-I/Users/edwin/.cabal/share/x86_64-osx-ghc-7.10.3/idris-1.1.1/libs/base","-I.","-I/usr/local/share/x86_64-osx-ghc-7.10.3/idris-1.1.1/libs/prelude","-I/usr/local/share/x86_64-osx-ghc-7.10.3/idris-1.1.1/libs/base","-I","-o","Hello"]

Notice the references to paths starting with /Users/edwin...

These paths seems to be hardcoded in the Idris binary, I'm guessing the distribution is either bad, or some environment variables are required.

Burc

PS: I've comment this in bug #4242 but I thought it was worth creating its own bug report for it.

machunter avatar Dec 31 '17 19:12 machunter

The paths are superfluous, but harmless in that there are paths on the command leading to the correct libdirs afterwards. I think they're there because both the lib paths from inside the prebuilt IBC file and the one made at compile time is included. Guess we would have to figure out if the first one is ever needed.

melted avatar Jan 01 '18 16:01 melted

So you're saying that the failure above is unrelated. There is something different in 1.1.1 vs. 1.1.0 which trigger the error above. I thought that would be it.

machunter avatar Jan 01 '18 17:01 machunter

Yes, the thing that is causing the 1.1.1 failure is a trailing -I followed by nothing, so the filename gets misinterpreted. I haven’t managed to reproduce that when building.

I know that the dirs aren’t causing trouble because my windows executables contain them too :-)

1 jan. 2018 kl. 18:14 skrev machunter [email protected]:

So you're saying that the failure above is unrelated. There is something different in 1.1.1 vs. 1.1.0 which trigger the error above. I thought that would be it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

melted avatar Jan 02 '18 12:01 melted

While harmless, I'd like to note that these /Users/edwin/... paths are still present in the 1.3.1 distribution, as I happened to run across them today.

SmiVan avatar Oct 22 '19 15:10 SmiVan