Ticket #2085 (closed bug: wontfix)

Opened 5 years ago

Last modified 5 years ago

cabal uses haddock from hard-coded location

Reported by: Frederik Owned by:
Priority: normal Milestone:
Component: Build System Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I don't know if this is a feature or a bug. It seems that cabal doesn't search for the haddock executable in $PATH but uses a hard-coded location. Is this the best behaviour? It seems confusing to me. It makes it difficult to upgrade different pieces of the system separately.

Change History

Changed 5 years ago by duncan

Will need more details, symptoms, build logs or whatever. What is this hard coded location? As far as I know and from looking at the code, it uses the path to find haddock, just like it does for almost every other program.

Also, it'd be helpful to know if you're talking about haddock-0.x or 2.x as they get treated somewhat differently.

Changed 5 years ago by Frederik

I see now that Cabal is storing the executable location in "dist/setup-config" during the configure step. Still seems somewhat strange, do other build systems do that? I think of PATH as part of my configuration already, it's not like I would have PATH set up correctly when configuring a package, and then incorrectly when building the same package. On the other hand, maybe there's a good reason I am not aware of for doing it this way.

Changed 5 years ago by duncan

  • status changed from new to closed
  • resolution set to wontfix

If someone specifies a non-standard location using --happy-prog= then we have to remember that in the configuration somewhere. Even if the program is on the path we have to check that it does indeed exist, so that involves finding it and often running it to check its version. Then the choice is between remembering the unqualified or fully qualified path. There does not seem to be much to choose between the two, we somewhat arbitrarily pick the qualified path.

I think other systems do this too, eg you'll see many build systems running /usr/bin/gcc even though they were only looking for gcc on the path at configure time. For example autoconf saves the path info in the Makefile, generated by ./configure.

Changed 5 years ago by Frederik

OK, that makes sense. Sorry for the bogus bug.

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.