From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Garlick Subject: Re: [PATCH] gnu: Add opencascade-oce Date: Thu, 26 Jan 2017 16:01:50 +0000 Message-ID: <1485446510.25569.39.camel@tourbillion-technology.com> References: <1484738618-3156-1-git-send-email-pgarlick@tourbillion-technology.com> <87k29s8bd3.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <1484827276.2709.14.camel@tourbillion-technology.com> <87y3y461h8.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87pojgla44.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-lA4xdQWk8Bc2PzH4rLo2" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWmV1-0000TE-IM for guix-devel@gnu.org; Thu, 26 Jan 2017 11:02:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWmUr-0006JQ-GM for guix-devel@gnu.org; Thu, 26 Jan 2017 11:02:11 -0500 In-Reply-To: <87pojgla44.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?ISO-8859-1?Q?Court=E8s?= , Marius Bakke Cc: guix-devel@gnu.org --=-lA4xdQWk8Bc2PzH4rLo2 Content-Type: multipart/alternative; boundary="=-vpOhfCtwI+jLxXBbU2vf" --=-vpOhfCtwI+jLxXBbU2vf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Sat, 2017-01-21 at 16:13 +0100, Ludovic Courtès wrote: > Marius Bakke skribis: > > > > > Paul Garlick writes: > [...] > > > > > Libtool and file should likely be native-inputs, not sure about the > > others. Could you check whether they are required and send an > > updated > > patch? > ‘file’ is already an implicit input, so I’m not why it needs to be > added > (perhaps OpenCascade depends on libmagic?). > > As for Libtool, I wonder why it is needed at all, especially given > that > OpenCascade is built with CMake. > > Ludo’. Hi Marius and Ludo, Thank you for your comments.  I have checked the dependencies and here are the results: ftgl: not needed qt: not needed libtool: not needed file: not needed tcl: required by the DRAW test harness tk: required by the DRAW test harness I have amended the patch to remove the extra dependencies.  The public domain licence information is now included.   Also, there is an extra configuration flag required to successfully build the DRAW libraries and executable.  The '-UCMAKE_INSTALL_RPATH' flag is required for the validate-runpath stage to succeed.  This is to do with the way the global variable is initialized.  There is a distinction in CMake between lists and strings, which was new to me so I will document it here.   Essentially, if a variable is initialized as a single string it cannot subsequently be overriden by a list of strings.  The cmake instructions in OpenCascade (in adm/cmake/BuildToolKit.cmake) attempt to do this at the install stage.  The DRAW harness needs a RUNPATH including both .../lib and .../lib/oce-0.17.  With the standard definition of CMAKE_INSTALL_RPATH (from cmake-build-system.scm) the substitution of the INSTALL_RPATH property only includes the first string.  Consequently, the validate-runpath phase fails (error: library ... not in RUNPATH ...).  The configuration flag -UCMAKE_INSTALL_RPATH unsets the global variable and allows the opencascade cmake rules to do the work instead, setting the RUNPATH correctly for each target. On the subject of the 0.18 version, perhaps this could be the subject of a separate patch.  There could be an argument to just update in the normal way (instead of having two packages at once).  The issue is related to the hardware requirements of recent versions of OpenGL.  It is useful to start with 0.17 as this imposes the least restriction on older graphics card.  I can do some testing on the new version, later on, to determine how important this is. The amended patch is attached. Best, Paul. --=-vpOhfCtwI+jLxXBbU2vf Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Sat, 2017-01-21 at 16:13 +0100, Ludovic Co= urt=C3=A8s wrote:
Marius Bakke <mbakke@fastmail.com> skribis:

Paul Garlick <pga= rlick@tourbillion-technology.com> writes:
[...]
Libtool and file should likely be native-inputs, not sure about the others. Could you check whether they are required and send an updated patch?
=E2=80=98file=E2=80=99 is already an implicit input, so I=E2=80=99m not why= it needs to be added (perhaps OpenCascade depends on libmagic?). As for Libtool, I wonder why it is needed at all, especially given that OpenCascade is built with CMake. Ludo=E2=80=99.

Hi Marius and Ludo,

Thank you for your comments.  I have checked the dependencies= and here are the results:

ftgl: not needed
<= div>qt: not needed
libtool: not needed
file: not needed=
tcl: required by the DRAW test harness
tk: required by= the DRAW test harness

I have amended the patch to= remove the extra dependencies.  The public domain licence information= is now included.  

Also, there is an extra c= onfiguration flag required to successfully build the DRAW libraries and exe= cutable.  The '-UCMAKE_INSTALL_RPATH' flag is required for the validat= e-runpath stage to succeed.  This is to do with the way the global var= iable is initialized.  There is a distinction in CMake between lists a= nd strings, which was new to me so I will document it here.  
Essentially, if a variable is initialized as a single string it cannot su= bsequently be overriden by a list of strings.  The cmake instructions = in OpenCascade (in adm/cmake/BuildToolKit.cmake) attempt to do this at the = install stage.  The DRAW harness needs a RUNPATH including both .../li= b and .../lib/oce-0.17.  With the standard definition of CMAKE_INSTALL= _RPATH (from cmake-build-system.scm) the substitution of the INSTALL_RPATH = property only includes the first string.  Consequently, the validate-r= unpath phase fails (error: library ... not in RUNPATH ...).  The confi= guration flag -UCMAKE_INSTALL_RPATH unsets the global variable and allows t= he opencascade cmake rules to do the work instead, setting the RUNPATH corr= ectly for each target.

On the subject of the 0.18 = version, perhaps this could be the subject of a separate patch.  There= could be an argument to just update in the normal way (instead of having t= wo packages at once).  The issue is related to the hardware requiremen= ts of recent versions of OpenGL.  It is useful to start with 0.17 as t= his imposes the least restriction on older graphics card.  I can do so= me testing on the new version, later on, to determine how important this is= .

The amended patch is attached.

Best,

Paul.

--=-vpOhfCtwI+jLxXBbU2vf-- --=-lA4xdQWk8Bc2PzH4rLo2 Content-Disposition: attachment; filename="0001-gnu-Add-opencascade-oce.patch" Content-Type: text/x-patch; name="0001-gnu-Add-opencascade-oce.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSBhNWY2NGFjOWI0ODgyNDkwMjdmYzkyYzQ2ZDczN2Q0NTcyZTU3ZDAyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tO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CBhdCB0aGUgaW50ZXJhY3RpdmUgY29tbWFuZC1s aW5lIGFzIHdlbGwgYXMgdmlhCiBzY3JpcHQgZmlsZXMuIikKICAgICAobGljZW5zZSBsaWNlbnNl OmdwbDMrKSkpCiAKKyhkZWZpbmUtcHVibGljIG9wZW5jYXNjYWRlLW9jZQorICAocGFja2FnZQor ICAgIChuYW1lICJvcGVuY2FzY2FkZS1vY2UiKQorICAgICh2ZXJzaW9uICIwLjE3LjIiKQorICAg IChzb3VyY2UKKyAgICAgIChvcmlnaW4KKyAgICAgICAgKG1ldGhvZCB1cmwtZmV0Y2gpCisgICAg ICAgICh1cmkgKHN0cmluZy1hcHBlbmQKKyAgICAgICAgICAgICAgICJodHRwczovL2dpdGh1Yi5j b20vdHBhdmlvdC9vY2UvYXJjaGl2ZS9PQ0UtIgorICAgICAgICAgICAgICAgdmVyc2lvbgorICAg ICAgICAgICAgICAgIi50YXIuZ3oiKSkKKyAgICAgICAgKHNoYTI1NgorICAgICAgICAgIChiYXNl MzIKKyAgICAgICAgICAgICIwdnBtbmIwazV5MmY3bHBtd3g5cGc5eWZxMjR6anZuc2FrNWFsemFj bmNmbTFodjliNmNkIikpKSkKKyAgICAoYnVpbGQtc3lzdGVtIGNtYWtlLWJ1aWxkLXN5c3RlbSkK KyAgICAoYXJndW1lbnRzCisgICAgICcoIzpjb25maWd1cmUtZmxhZ3MKKyAgICAgICAgKGxpc3Qg Ii1ET0NFX1RFU1RJTkc6Qk9PTD1PTiIKKyAgICAgICAgICAgICAgIi1ET0NFX1VTRV9UQ0xfVEVT VF9GUkFNRVdPUks6Qk9PTD1PTiIKKyAgICAgICAgICAgICAgIi1ET0NFX0RSQVc6Qk9PTD1PTiIK KyAgICAgICAgICAgICAgKHN0cmluZy1hcHBlbmQgIi1ET0NFX0lOU1RBTExfUFJFRklYOlBBVEg9 IgorICAgICAgICAgICAgICAgICAgICAgICAgKGFzc29jLXJlZiAlb3V0cHV0cyAib3V0IikpCisg ICAgICAgICAgICAgICItVUNNQUtFX0lOU1RBTExfUlBBVEgiKSkpCisgICAgKGlucHV0cworICAg ICAgYCgoImZyZWV0eXBlIiAsZnJlZXR5cGUpCisgICAgICAgICgiZ2x1IiAsZ2x1KQorICAgICAg ICAoImxpYnhtdSIgLGxpYnhtdSkKKyAgICAgICAgKCJtZXNhIiAsbWVzYSkKKyAgICAgICAgKCJ0 Y2wiICx0Y2wpCisgICAgICAgICgidGsiICx0aykpKQorICAgIChuYXRpdmUtaW5wdXRzCisgICAg ICBgKCgicHl0aG9uIiAscHl0aG9uLXdyYXBwZXIpKSkKKyAgICAoaG9tZS1wYWdlICJodHRwczov L2dpdGh1Yi5jb20vdHBhdmlvdC9vY2UiKQorICAgIChzeW5vcHNpcworICAgICAgIkxpYnJhcmll cyBmb3IgM0QgbW9kZWxpbmcgYW5kIG51bWVyaWNhbCBzaW11bGF0aW9uIikKKyAgICAoZGVzY3Jp cHRpb24gIk9DRSBzdGFuZHMgZm9yIE9wZW4gQ0FTQ0FERSBDb21tdW5pdHkgRWRpdGlvbi4gIFRo ZSBwcm9qZWN0CitnYXRoZXJzIHBhdGNoZXMvaW1wcm92ZW1lbnRzL2V4cGVyaW1lbnRzIGNvbnRy aWJ1dGVkIGJ5IHVzZXJzIG92ZXIgdGhlIG9mZmljaWFsCitPcGVuIENBU0NBREUgbGlicmFyeS4i KQorICAgIChsaWNlbnNlIChsaXN0IGxpY2Vuc2U6bGdwbDIuMTsgT0NFIGxpYnJhcmllcywgd2l0 aCBhbiBleGNlcHRpb24gZm9yIHRoZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDsgdXNlIG9mIGhlYWRlciBmaWxlczsgc2VlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOyBPQ0NUX0xHUExfRVhDRVBUSU9OLnR4dAorICAgICAgICAgICAgICAgICAgIGxpY2Vu c2U6cHVibGljLWRvbWFpbjsgZmlsZXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA7IHNyYy9TdGFuZGFyZC9TdGFuZGFyZF9TdGRBbGxvY2F0b3IuaHh4IGFuZAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDsgc3JjL05Db2xsZWN0aW9uL05Db2xsZWN0aW9uX1N0 ZEFsbG9jYXRvci5oeHgKKyAgICAgICAgICAgICAgICAgICBsaWNlbnNlOmV4cGF0OyBmaWxlIHNy Yy9PcGVuR2wvT3BlbkdsX2dsZXh0LmgKKyAgICAgICAgICAgICAgICAgICBsaWNlbnNlOmJzZC0z KSkpKTsgdGVzdCBmcmFtZXdvcmsgZ3Rlc3QKKwogKGRlZmluZS1wdWJsaWMgZ21zaAogICAocGFj a2FnZQogICAgIChuYW1lICJnbXNoIikKLS0gCjIuNy40Cgo= --=-lA4xdQWk8Bc2PzH4rLo2--