Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumPy: rework, bump, cleanup, extra libs #3694

Merged
merged 7 commits into from Mar 27, 2019

Conversation

extrowerk
Copy link
Member

@extrowerk extrowerk commented Mar 17, 2019

Refer: https://discuss.haiku-os.org/t/package-python3-numpy-not-working-on-nightly-build-hrev52992/8380

Import works now, but both version (python2 and 3) fails with missing symbols:

  • Python2: cblas_call_sub
  • Python3: cblas_sgemm

Both symbol defined in libopenblas-r0.3.5.so:

/s/lib » objdump -x libopenblasp-r0.3.5.so| ag cblas_sgemm
00000000000b07e0 g     F .text  00000000000006d1              cblas_sgemm
/s/lib » objdump -x libopenblasp-r0.3.5.so| ag cblas_cdotc_sub
00000000000c13b0 g     F .text  00000000000000b2              cblas_cdotc_sub

Disabling blas results Python crash at import.

@extrowerk
Copy link
Member Author

@Begasus can you pls check blis on x86?

@hanya
Copy link
Contributor

hanya commented Mar 17, 2019

How did you obtain the missing symbol error? I tried to run numpy.test() but no such error happened.
But I needed to patch to avoid invalid opcode (xgetbv, GCC 7.3.0 problem) while import the module.

@extrowerk
Copy link
Member Author

I'll try to add your patch and retest it.

@extrowerk
Copy link
Member Author

Now it works ok, at least no problem at importing it.
I would say, it would be better to merge mine, as it is uniformized, one recipe for both python version, but i'm open for other ideas.

@extrowerk
Copy link
Member Author

pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\n\
cmd:f2py\n\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this mean that the two python versions will conflict?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

cat > site.cfg << EOF
[ALL]
libraries = execinfo,lapack,openblas
library_dirs = /system/`echo ${relativeDevelopLibDir}`
Copy link
Contributor

@alaviss alaviss Mar 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
library_dirs = /system/`echo ${relativeDevelopLibDir}`
library_dirs = /system/$relativeDevelopLibDir

It'd be shorter to just use the variables directly :P

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do the same with all other variables?

SOURCE_DIR="numpy-$portVersion"
PATCHES="numpy-$portVersion.patch"

ARCHITECTURES="any"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be any. $secondaryArchSuffix will only work with a secondary architecture defined anyway.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blis can't be build for x86_gcc2, so agreed, any shouldn't be used here

ARCHITECTURES="any"

PROVIDES="
$portName = $portVersion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use $portName here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recipe template contains it.

"

BUILD_REQUIRES="
haiku_devel$secondaryArchSuffix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some mixup? :)

-	haiku_devel$secondaryArchSuffix
+	haiku${secondaryArchSuffix}_devel

@extrowerk
Copy link
Member Author

Seems to be ok, at least it works, unlike the earlier, so lets merge it.

@extrowerk extrowerk merged commit 0c381d3 into haikuports:master Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants