From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60663) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBJlT-0003FU-Bm for guix-patches@gnu.org; Fri, 20 Sep 2019 10:20:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBJlS-000842-DT for guix-patches@gnu.org; Fri, 20 Sep 2019 10:20:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49449) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBJlS-00083v-9F for guix-patches@gnu.org; Fri, 20 Sep 2019 10:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iBJlS-00005T-2g for guix-patches@gnu.org; Fri, 20 Sep 2019 10:20:02 -0400 Subject: [bug#36477] [PATCH v3 04/48] gnu: cmake: Fix cross-compilation. Resent-Message-ID: References: <20190902153333.11190-1-m.othacehe@gmail.com> <20190902153333.11190-5-m.othacehe@gmail.com> <87d0gg2p30.fsf@gnu.org> From: Mathieu Othacehe In-reply-to: <87d0gg2p30.fsf@gnu.org> Date: Fri, 20 Sep 2019 16:18:55 +0200 Message-ID: <875zlnt5io.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36477@debbugs.gnu.org Hey Ludo, > It seems to be enough to just add =E2=80=98search-paths=E2=80=99 to =E2= =80=98cmake=E2=80=99: > I tried to do that but it doesn't work. Let's consider libgit2 which uses cmake, when cross-compiling, both native-search-paths and search-paths are set. Both are passed to bag-build in "bag->cross-derivation". Then, gnu-build is called from cmake-build and "set-paths" function is called. "set-path-environment-variable" is called for CMAKE_PREFIX_PATH which is in search-paths and then called again for CMAKE_PREFIX_PATH in native-search-paths. The later will cause the first setenv to be undone, and we end-up with only native-inputs in CMAKE_PREFIX_PATH variable. Whereas, with my patch only search-paths is set, so it can't be "undone" by native-search-paths. CMAKE_PREFIX_PATH is filled with only "inputs" which is what is expected. I hope I'm clear and I'm sorry to reply so late, didn't have any slack in my day job :( WDYT? Thanks, Mathieu