Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] pymol: enable for musl, fix byte-compilation.
@ 2020-09-28 20:08 ericonr
  2020-09-28 20:22 ` [PR PATCH] [Updated] " ericonr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ericonr @ 2020-09-28 20:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pymol
https://github.com/void-linux/void-packages/pull/25162

pymol: enable for musl, fix byte-compilation.
It doesn't segfault anymore :D 

However, it's doing something weird in linking:

```
$ pymol
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 64, in <module>
    import pymol
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 580, in <module>
    import pymol._cmd
ImportError: Error relocating /usr/lib/python3.8/site-packages/pymol/_cmd.so: backtrace_symbols: symbol not found
$ LD_PRELOAD=/lib/libexecinfo.so.1 pymol
 PyMOL(TM) Molecular Graphics System, Version 2.3.0.
 Copyright (c) Schrodinger, LLC.
 All Rights Reserved.
[...]
```

It found the symbol while linking (I guess?) but it somehow wasn't recorded.

A patch file from https://github.com/void-linux/void-packages/pull/25162.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pymol-25162.patch --]
[-- Type: text/x-diff, Size: 2122 bytes --]

From fb51ebb5712773be5d16d5e7feb12f4000dc8e0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 28 Sep 2020 17:03:36 -0300
Subject: [PATCH] pymol: enable for musl, fix byte-compilation.

---
 srcpkgs/pymol/patches/musl.patch | 13 +++++++++++++
 srcpkgs/pymol/template           | 12 ++++++++----
 2 files changed, 21 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/pymol/patches/musl.patch

diff --git a/srcpkgs/pymol/patches/musl.patch b/srcpkgs/pymol/patches/musl.patch
new file mode 100644
index 00000000000..a94d8235593
--- /dev/null
+++ b/srcpkgs/pymol/patches/musl.patch
@@ -0,0 +1,13 @@
+diff --git a/ov/src/ov_types.h b/ov/src/ov_types.h
+index 6d2ad80..11d1589 100644
+--- ov/src/ov_types.h
++++ ov/src/ov_types.h
+@@ -19,6 +19,8 @@ extern "C" {
+ #include <windows.h>
+ #endif
+ 
++#include <cstddef>
++
+   /* automatically detect 64-bit machines */
+ 
+ #ifndef OV_32_BIT
diff --git a/srcpkgs/pymol/template b/srcpkgs/pymol/template
index 466f6d09db0..426973109ec 100644
--- a/srcpkgs/pymol/template
+++ b/srcpkgs/pymol/template
@@ -1,7 +1,7 @@
 # Template file for 'pymol'
 pkgname=pymol
 version=2.3.0
-revision=3
+revision=4
 wrksrc=${pkgname}-open-source-${version}
 build_style="python3-module"
 hostmakedepends="python3"
@@ -18,9 +18,10 @@ checksum="62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0
  0ea81faaf336becc669a193777d0dca55475d303d1236b57df25cf67ff7c2bcd"
 skip_extraction="${pkgname}.png"
 
-case $XBPS_TARGET_MACHINE in
-	*-musl) broken="segfaults on start";;
-esac
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
 
 # TODO: make it use pkg-config, if possible
 CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include/libxml2
@@ -30,4 +31,7 @@ post_install() {
 	vlicense LICENSE
 	vinstall "${FILESDIR}/${pkgname}.desktop" 755 usr/share/applications
 	vinstall "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}.png" 644 usr/share/pixmaps
+
+	# these tests are written for python2
+	rm -r "${DESTDIR}/${py3_sitelib}/pymol/pymol_path/test"
 }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] pymol: enable for musl, fix byte-compilation.
  2020-09-28 20:08 [PR PATCH] pymol: enable for musl, fix byte-compilation ericonr
@ 2020-09-28 20:22 ` ericonr
  2020-09-28 20:40 ` ericonr
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2020-09-28 20:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pymol
https://github.com/void-linux/void-packages/pull/25162

pymol: enable for musl, fix byte-compilation.
It doesn't segfault anymore :D 

However, it's doing something weird in linking:

```
$ pymol
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 64, in <module>
    import pymol
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 580, in <module>
    import pymol._cmd
ImportError: Error relocating /usr/lib/python3.8/site-packages/pymol/_cmd.so: backtrace_symbols: symbol not found
$ LD_PRELOAD=/lib/libexecinfo.so.1 pymol
 PyMOL(TM) Molecular Graphics System, Version 2.3.0.
 Copyright (c) Schrodinger, LLC.
 All Rights Reserved.
[...]
```

It found the symbol while linking (I guess?) but it somehow wasn't recorded.

A patch file from https://github.com/void-linux/void-packages/pull/25162.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pymol-25162.patch --]
[-- Type: text/x-diff, Size: 2590 bytes --]

From 88a889b0d9f4e92ec483ffbae9a8c0e6e9e8cc5e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 28 Sep 2020 17:03:36 -0300
Subject: [PATCH] pymol: enable for musl, fix byte-compilation.

Replace multiple include flags with PREFIX_PATH env var.
---
 srcpkgs/pymol/patches/musl.patch | 13 +++++++++++++
 srcpkgs/pymol/template           | 25 ++++++++++++++++++-------
 2 files changed, 31 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/pymol/patches/musl.patch

diff --git a/srcpkgs/pymol/patches/musl.patch b/srcpkgs/pymol/patches/musl.patch
new file mode 100644
index 00000000000..a94d8235593
--- /dev/null
+++ b/srcpkgs/pymol/patches/musl.patch
@@ -0,0 +1,13 @@
+diff --git a/ov/src/ov_types.h b/ov/src/ov_types.h
+index 6d2ad80..11d1589 100644
+--- ov/src/ov_types.h
++++ ov/src/ov_types.h
+@@ -19,6 +19,8 @@ extern "C" {
+ #include <windows.h>
+ #endif
+ 
++#include <cstddef>
++
+   /* automatically detect 64-bit machines */
+ 
+ #ifndef OV_32_BIT
diff --git a/srcpkgs/pymol/template b/srcpkgs/pymol/template
index 466f6d09db0..a63c2c1789f 100644
--- a/srcpkgs/pymol/template
+++ b/srcpkgs/pymol/template
@@ -1,7 +1,7 @@
 # Template file for 'pymol'
 pkgname=pymol
 version=2.3.0
-revision=3
+revision=4
 wrksrc=${pkgname}-open-source-${version}
 build_style="python3-module"
 hostmakedepends="python3"
@@ -18,16 +18,27 @@ checksum="62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0
  0ea81faaf336becc669a193777d0dca55475d303d1236b57df25cf67ff7c2bcd"
 skip_extraction="${pkgname}.png"
 
-case $XBPS_TARGET_MACHINE in
-	*-musl) broken="segfaults on start";;
-esac
+# PREFIX_PATH isn't used for the py3 include path
+export PREFIX_PATH="${XBPS_CROSS_BASE}"
+CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
 
-# TODO: make it use pkg-config, if possible
-CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include/libxml2
- -I${XBPS_CROSS_BASE}/usr/include/freetype2"
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+fi
+
+pre_configure() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		# execinfo is linked when building for freebsd, force it for linux with musl
+		vsed -e 's@sys.platform.startswith("freebsd")@sys.platform.startswith("linux")@' \
+			-i setup.py
+	fi
+}
 
 post_install() {
 	vlicense LICENSE
 	vinstall "${FILESDIR}/${pkgname}.desktop" 755 usr/share/applications
 	vinstall "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}.png" 644 usr/share/pixmaps
+
+	# these tests are written for python2
+	rm -r "${DESTDIR}/${py3_sitelib}/pymol/pymol_path/test"
 }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] pymol: enable for musl, fix byte-compilation.
  2020-09-28 20:08 [PR PATCH] pymol: enable for musl, fix byte-compilation ericonr
  2020-09-28 20:22 ` [PR PATCH] [Updated] " ericonr
@ 2020-09-28 20:40 ` ericonr
  2020-09-28 20:50 ` ericonr
  2020-09-28 20:51 ` [PR PATCH] [Merged]: " ericonr
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2020-09-28 20:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pymol
https://github.com/void-linux/void-packages/pull/25162

pymol: enable for musl, fix byte-compilation.
It doesn't segfault anymore :D 

However, it's doing something weird in linking:

```
$ pymol
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 64, in <module>
    import pymol
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 580, in <module>
    import pymol._cmd
ImportError: Error relocating /usr/lib/python3.8/site-packages/pymol/_cmd.so: backtrace_symbols: symbol not found
$ LD_PRELOAD=/lib/libexecinfo.so.1 pymol
 PyMOL(TM) Molecular Graphics System, Version 2.3.0.
 Copyright (c) Schrodinger, LLC.
 All Rights Reserved.
[...]
```

It found the symbol while linking (I guess?) but it somehow wasn't recorded.

---

This is now fixed.

A patch file from https://github.com/void-linux/void-packages/pull/25162.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pymol-25162.patch --]
[-- Type: text/x-diff, Size: 2566 bytes --]

From 2d88541e914f8b668ab5c88b25758a3143316aff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 28 Sep 2020 17:03:36 -0300
Subject: [PATCH] pymol: enable for musl, fix byte-compilation.

Replace multiple include flags with PREFIX_PATH env var.
---
 srcpkgs/pymol/patches/musl.patch | 13 +++++++++++++
 srcpkgs/pymol/template           | 25 ++++++++++++++++++-------
 2 files changed, 31 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/pymol/patches/musl.patch

diff --git a/srcpkgs/pymol/patches/musl.patch b/srcpkgs/pymol/patches/musl.patch
new file mode 100644
index 00000000000..a94d8235593
--- /dev/null
+++ b/srcpkgs/pymol/patches/musl.patch
@@ -0,0 +1,13 @@
+diff --git a/ov/src/ov_types.h b/ov/src/ov_types.h
+index 6d2ad80..11d1589 100644
+--- ov/src/ov_types.h
++++ ov/src/ov_types.h
+@@ -19,6 +19,8 @@ extern "C" {
+ #include <windows.h>
+ #endif
+ 
++#include <cstddef>
++
+   /* automatically detect 64-bit machines */
+ 
+ #ifndef OV_32_BIT
diff --git a/srcpkgs/pymol/template b/srcpkgs/pymol/template
index 466f6d09db0..6bdb9ba07e9 100644
--- a/srcpkgs/pymol/template
+++ b/srcpkgs/pymol/template
@@ -1,7 +1,7 @@
 # Template file for 'pymol'
 pkgname=pymol
 version=2.3.0
-revision=3
+revision=4
 wrksrc=${pkgname}-open-source-${version}
 build_style="python3-module"
 hostmakedepends="python3"
@@ -18,16 +18,27 @@ checksum="62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0
  0ea81faaf336becc669a193777d0dca55475d303d1236b57df25cf67ff7c2bcd"
 skip_extraction="${pkgname}.png"
 
-case $XBPS_TARGET_MACHINE in
-	*-musl) broken="segfaults on start";;
-esac
+export PREFIX_PATH="${XBPS_CROSS_BASE}/usr"
+# PREFIX_PATH isn't used for the py3 include path
+CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
 
-# TODO: make it use pkg-config, if possible
-CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include/libxml2
- -I${XBPS_CROSS_BASE}/usr/include/freetype2"
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+fi
+
+pre_configure() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		# execinfo is linked when building for freebsd, force it for linux with musl
+		vsed -e 's@sys.platform.startswith("freebsd")@True@' \
+			-i setup.py
+	fi
+}
 
 post_install() {
 	vlicense LICENSE
 	vinstall "${FILESDIR}/${pkgname}.desktop" 755 usr/share/applications
 	vinstall "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}.png" 644 usr/share/pixmaps
+
+	# these tests are written for python2
+	rm -r "${DESTDIR}/${py3_sitelib}/pymol/pymol_path/test"
 }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] pymol: enable for musl, fix byte-compilation.
  2020-09-28 20:08 [PR PATCH] pymol: enable for musl, fix byte-compilation ericonr
  2020-09-28 20:22 ` [PR PATCH] [Updated] " ericonr
  2020-09-28 20:40 ` ericonr
@ 2020-09-28 20:50 ` ericonr
  2020-09-28 20:51 ` [PR PATCH] [Merged]: " ericonr
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2020-09-28 20:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pymol
https://github.com/void-linux/void-packages/pull/25162

pymol: enable for musl, fix byte-compilation.
It doesn't segfault anymore :D 

However, it's doing something weird in linking:

```
$ pymol
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 64, in <module>
    import pymol
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 580, in <module>
    import pymol._cmd
ImportError: Error relocating /usr/lib/python3.8/site-packages/pymol/_cmd.so: backtrace_symbols: symbol not found
$ LD_PRELOAD=/lib/libexecinfo.so.1 pymol
 PyMOL(TM) Molecular Graphics System, Version 2.3.0.
 Copyright (c) Schrodinger, LLC.
 All Rights Reserved.
[...]
```

It found the symbol while linking (I guess?) but it somehow wasn't recorded.

---

This is now fixed.

A patch file from https://github.com/void-linux/void-packages/pull/25162.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pymol-25162.patch --]
[-- Type: text/x-diff, Size: 3170 bytes --]

From 25c60927bed3d70bb35ea815225e1ea116aeaf34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 28 Sep 2020 17:03:36 -0300
Subject: [PATCH] pymol: enable for musl, fix byte-compilation.

Replace multiple include flags with PREFIX_PATH env var.

Also xlintify.
---
 srcpkgs/pymol/patches/musl.patch | 13 +++++++++++++
 srcpkgs/pymol/template           | 30 ++++++++++++++++++++++--------
 2 files changed, 35 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/pymol/patches/musl.patch

diff --git a/srcpkgs/pymol/patches/musl.patch b/srcpkgs/pymol/patches/musl.patch
new file mode 100644
index 00000000000..a94d8235593
--- /dev/null
+++ b/srcpkgs/pymol/patches/musl.patch
@@ -0,0 +1,13 @@
+diff --git a/ov/src/ov_types.h b/ov/src/ov_types.h
+index 6d2ad80..11d1589 100644
+--- ov/src/ov_types.h
++++ ov/src/ov_types.h
+@@ -19,6 +19,8 @@ extern "C" {
+ #include <windows.h>
+ #endif
+ 
++#include <cstddef>
++
+   /* automatically detect 64-bit machines */
+ 
+ #ifndef OV_32_BIT
diff --git a/srcpkgs/pymol/template b/srcpkgs/pymol/template
index 466f6d09db0..19a1f897e57 100644
--- a/srcpkgs/pymol/template
+++ b/srcpkgs/pymol/template
@@ -1,7 +1,7 @@
 # Template file for 'pymol'
 pkgname=pymol
 version=2.3.0
-revision=3
+revision=4
 wrksrc=${pkgname}-open-source-${version}
 build_style="python3-module"
 hostmakedepends="python3"
@@ -10,7 +10,7 @@ makedepends="msgpack-devel python3-numpy freetype-devel libfreeglut-devel glew-d
 depends="python3-numpy tcsh python3-pmw python3-tkinter python3-PyQt5"
 short_desc="PyMOL molecular visualization system"
 maintainer="Brenton Horne <brentonhorne77@gmail.com>"
-license="PyMOL"
+license="custom:PyMOL"
 homepage="https://pymol.org/"
 distfiles="https://github.com/schrodinger/pymol-open-source/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz
  https://c.fsdn.com/allura/p/${pkgname}/icon>${pkgname}.png"
@@ -18,16 +18,30 @@ checksum="62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0
  0ea81faaf336becc669a193777d0dca55475d303d1236b57df25cf67ff7c2bcd"
 skip_extraction="${pkgname}.png"
 
-case $XBPS_TARGET_MACHINE in
-	*-musl) broken="segfaults on start";;
-esac
+export PREFIX_PATH="${XBPS_CROSS_BASE}/usr"
+# PREFIX_PATH isn't used for the py3 include path
+CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
 
-# TODO: make it use pkg-config, if possible
-CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include/libxml2
- -I${XBPS_CROSS_BASE}/usr/include/freetype2"
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+fi
+
+pre_configure() {
+	if [ "$XBPS_TARGET_LIBC" = musl ]; then
+		# execinfo is linked when building for freebsd, force it for linux with musl
+		vsed -e 's@sys.platform.startswith("freebsd")@True@' \
+			-i setup.py
+	fi
+}
 
 post_install() {
 	vlicense LICENSE
 	vinstall "${FILESDIR}/${pkgname}.desktop" 755 usr/share/applications
 	vinstall "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}.png" 644 usr/share/pixmaps
+
+	# these tests are written for python2
+	# LICENSE is vlicense'd
+	rm -r ${DESTDIR}/${py3_sitelib}/pymol/pymol_path/{test,LICENSE}
+
+	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Merged]: pymol: enable for musl, fix byte-compilation.
  2020-09-28 20:08 [PR PATCH] pymol: enable for musl, fix byte-compilation ericonr
                   ` (2 preceding siblings ...)
  2020-09-28 20:50 ` ericonr
@ 2020-09-28 20:51 ` ericonr
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2020-09-28 20:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

There's a merged pull request on the void-packages repository

pymol: enable for musl, fix byte-compilation.
https://github.com/void-linux/void-packages/pull/25162

Description:
It doesn't segfault anymore :D 

However, it's doing something weird in linking:

```
$ pymol
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 64, in <module>
    import pymol
  File "/usr/lib/python3.8/site-packages/pymol/__init__.py", line 580, in <module>
    import pymol._cmd
ImportError: Error relocating /usr/lib/python3.8/site-packages/pymol/_cmd.so: backtrace_symbols: symbol not found
$ LD_PRELOAD=/lib/libexecinfo.so.1 pymol
 PyMOL(TM) Molecular Graphics System, Version 2.3.0.
 Copyright (c) Schrodinger, LLC.
 All Rights Reserved.
[...]
```

It found the symbol while linking (I guess?) but it somehow wasn't recorded.

---

This is now fixed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-28 20:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 20:08 [PR PATCH] pymol: enable for musl, fix byte-compilation ericonr
2020-09-28 20:22 ` [PR PATCH] [Updated] " ericonr
2020-09-28 20:40 ` ericonr
2020-09-28 20:50 ` ericonr
2020-09-28 20:51 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).