From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOhU5-0002oN-KL for guix-patches@gnu.org; Sat, 24 Jun 2017 05:36:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOhU2-0000Hz-HX for guix-patches@gnu.org; Sat, 24 Jun 2017 05:36:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOhU2-0000Hu-Da for guix-patches@gnu.org; Sat, 24 Jun 2017 05:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dOhU2-0006Bj-3h for guix-patches@gnu.org; Sat, 24 Jun 2017 05:36:02 -0400 Subject: [bug#27344] [PATCH v2 06/12] gnu: Add freehdl. Resent-Message-ID: References: <20170622191005.25422-1-theodoros.for@openmailbox.org> <20170622191005.25422-6-theodoros.for@openmailbox.org> <20170624091837.4097c371@scratchpost.org> From: Theodoros Foradis Message-ID: <87injlraok.fsf@openmailbox.org> In-reply-to: <20170624091837.4097c371@scratchpost.org> Date: Sat, 24 Jun 2017 12:34:46 +0300 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27344@debbugs.gnu.org Hello, >> + (add-before 'configure 'patch-pkg-config >> + (lambda _ >> + (substitute* "freehdl/freehdl-config" >> + (("pkg-config") (which "pkg-config")) >> + (("cat") (which "cat"))) >> + #t)) > > freehdl-config is installed, but it uses a path to pkg-config which is from a native-input (so it will not be retained). > > Does this ever work again after removing pkg-config from your profile and then doing "guix gc" ? I doubt it... > >> + (add-after 'configure 'patch-freehdl-pc >> + (lambda _ >> + (substitute* "freehdl.pc" >> + (("=g\\+\\+") (string-append "=" (which "g++"))) >> + (("=libtool") (string-append "=" (which "libtool")))) >> + #t)) > > Same here... > >> + (add-after 'install-scripts 'make-wrapper >> + (lambda* (#:key outputs #:allow-other-keys) >> + (let ((out (assoc-ref outputs "out"))) >> + (wrap-program (string-append out "/bin/freehdl-config") >> + `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig"))))) > > >> + #t))))) >> + (inputs >> + `(("perl" ,perl))) >> + (native-inputs >> + `(("pkg-config" ,pkg-config) >> + ("libtool" ,libtool))) > > > I'm not sure how to proceed so I'll stop at this point (with freehdl not in) until the path is clear :) You are correct, I totally missed the issue there. I can think of two possible ways to solve the issue, though I may be making wrong assumptions. - Move pkg-config to inputs, and disable cross-compilation of the package, if possible. - Have both pkg-configs at build time. Use the native pkg-config in building and reference the non-native one in freehdl-config. Is this possible with guix? -- Theodoros Foradis