Git Product home page Git Product logo

Comments (6)

angerman avatar angerman commented on August 23, 2024

calling ghc-pkg dump directly, tells us that the package.conf.d is missing.

ghc-pkg: /Users/angerman/Projects/Haskell/ghc/package.conf.d: getDirectoryContents: does not exist (No such file or directory)

I think this might be related to #22.

from hadrian.

angerman avatar angerman commented on August 23, 2024

In the ghc.mk we find:

INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d

# Install packages in the right order, so that ghc-pkg doesn't complain.
# Also, install ghc-pkg first.
ifeq "$(Windows_Host)" "NO"
INSTALLED_GHC_REAL=$(DESTDIR)$(ghclibexecdir)/bin/ghc
INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(ghclibexecdir)/bin/ghc-pkg
else
INSTALLED_GHC_REAL=$(DESTDIR)$(bindir)/ghc.exe
INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(bindir)/ghc-pkg.exe
endif

# Set the INSTALL_DISTDIR_p for each package; compiler is special
$(foreach p,$(filter-out compiler,$(INSTALL_PACKAGES)),\
   $(eval INSTALL_DISTDIR_$p = dist-install))
INSTALL_DISTDIR_compiler = stage2

# Now we can do the installation
install_packages: install_libexecs
install_packages: rts/dist/package.conf.install
        $(INSTALL_DIR) "$(DESTDIR)$(topdir)"
        $(call removeTrees,"$(INSTALLED_PACKAGE_CONF)")
        $(INSTALL_DIR) "$(INSTALLED_PACKAGE_CONF)"
        $(INSTALL_DIR) "$(DESTDIR)$(topdir)/rts"
        $(call installLibsTo, $(RTS_INSTALL_LIBS), "$(DESTDIR)$(topdir)/rts")
        $(foreach p, $(INSTALL_PACKAGES),                             \
            $(call make-command,                                      \
                   "$(ghc-cabal_INPLACE)" copy                        \
                                          $p $(INSTALL_DISTDIR_$p)    \
                                          "$(STRIP_CMD)"              \
                                          '$(DESTDIR)'                \
                                          '$(prefix)'                 \
                                          '$(ghclibdir)'              \
                                          '$(docdir)/html/libraries'  \
                                          '$(GhcLibWays)'))
        "$(INSTALLED_GHC_PKG_REAL)" --force --global-package-db "$(INSTALLED_PACKAGE_CONF)" update rts/dist/package.conf.install
        $(foreach p, $(INSTALL_PACKAGES),                             \
            $(call make-command,                                      \
                   "$(ghc-cabal_INPLACE)" register                    \
                                          $p $(INSTALL_DISTDIR_$p)    \
                                          "$(INSTALLED_GHC_REAL)"     \
                                          "$(INSTALLED_GHC_PKG_REAL)" \
                                          "$(DESTDIR)$(topdir)"       \
                                          '$(DESTDIR)'                \
                                          '$(prefix)'                 \
                                          '$(ghclibdir)'              \
                                          '$(docdir)/html/libraries'  \
                                          $(RelocatableBuild)))
# when we install the packages above, ghc-pkg obeys umask when creating
# the package.conf files, but for everything else we specify the
# permissions. We therefore now fix the permissions of package.cache.
# This means "sudo make install" does the right thing even if it runs
# with an 077 umask.
        for f in '$(INSTALLED_PACKAGE_CONF)'/*; do $(CREATE_DATA) "$$f"; done

from hadrian.

angerman avatar angerman commented on August 23, 2024

There are two issues here. First the wrong path. It should be inplace/lib/package.conf.d. And the missing init call. Hence this can be manually solved with:

inplace/bin/ghc-pkg init inplace/lib/package.conf.d

from hadrian.

angerman avatar angerman commented on August 23, 2024

@snowleopard I guess we need a rule, that build package.conf.d and have stage2 and onward depend on the existence of the package.conf.d.

from hadrian.

snowleopard avatar snowleopard commented on August 23, 2024

Right, thanks for getting to the core of this. I'll prepare a fix.

from hadrian.

snowleopard avatar snowleopard commented on August 23, 2024

Done! Please give it a try, as I can't test this properly on Windows.

from hadrian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.