Package Details: pythia 8.2.35-5

Git Clone URL: https://aur.archlinux.org/pythia.git (read-only)
Package Base: pythia
Description: High-energy physics events generator.
Upstream URL: http://home.thep.lu.se/Pythia/
Licenses: GPL
Provides: pythia, pythia8
Submitter: sfncmp1729
Maintainer: kgizdov
Last Packager: kgizdov
Votes: 5
Popularity: 0.009844
First Submitted: 2015-12-24 00:04
Last Updated: 2018-08-13 14:30

Dependencies (7)

Required by (10)

Sources (4)

Latest Comments

1 2 3 Next › Last »

petronny commented on 2018-08-15 09:45

I build it with extra-x86_64-build

$ pacman -Fo /usr/bin/extra-x86_64-build
usr/bin/extra-x86_64-build is owned by extra/devtools 20180531-3

Just run extra-x86_64-build instead of makepkg.

kgizdov commented on 2018-08-13 11:06

@petronny, I would avoid polluting the environment for everyone, but I will try to mitigate with a better solution - possibly only depending on base or base-devel. To me this is an issue on your side with your specific way of building, which you still haven't detailed. Are you using makepkg or an AUR helper? It's quite strange that the PKGBUILD is not being re-read by whatever you use after the dependencies are satisfied. This is the problem in your case.

petronny commented on 2018-08-13 09:52

@kgizdov You may need to export it.

export _python_ver=$(python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))' )

kgizdov commented on 2018-08-13 08:34

@petronny, the line creates a variable that I use in a few places, not just in prepare. The package clearly wants python to be installed before it's built. But maybe the way you're running it causes this to not be evaluated. I will see if there is a better way. Still probably an issue on your side.

petronny commented on 2018-08-13 06:31

@kgizdov I got it. The problem is python is installed after the PKGBUILD is read.

_python_ver=$(python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))' )

This line should be in prepare().

kgizdov commented on 2018-08-11 18:50

@petronny, this has nothing to do with the package. The deps are optional and there's probably an issue with your chroot and folder deduction/permissions and makepkg

EDIT: ah, no, Pythia can't find your python from the chroot environment. You can see it didn't enable it during the build process. Please update the paths with where python is installed.

petronny commented on 2018-08-10 04:39

Hi, if I build the package with makepkg, I get

  -> Applying patches...
patching file examples/Makefile
WARNING: Disabling EVTGEN - library EvtGen missing.
WARNING: Disabling FASTJET3 - library fastjet missing.
WARNING: Disabling HEPMC2 - library HepMC missing.
WARNING: Disabling HEPMC3 - library HepMC missing.
WARNING: Disabling LHAPDF5 - library LHAPDF missing.
WARNING: Disabling LHAPDF6 - library LHAPDF missing.
WARNING: Disabling POWHEG - binary hvq missing.
WARNING: Disabling PROMC - library promc missing.
WARNING: Disabling ROOT - binary rootcint missing.
WARNING: Disabling ROOT - binary root-config missing.
---------------------------------------------------------------------
|                    PYTHIA Configuration Summary                   |
---------------------------------------------------------------------
Configured for LINUX with the following options:
--enable-shared

The following optional external packages will be used:
* GZIP
* BOOST
* PYTHON

And I will get /src/pythia8235/lib/_pythia8.so.

But if I build it with extra-x86_64-build (from devtools) in a chroot environment, I get

==> Starting prepare()...
  -> Applying patches...
patching file examples/Makefile
WARNING: Disabling EVTGEN - header EvtGen/EvtGen.hh missing.
WARNING: Disabling EVTGEN - library EvtGen missing.
WARNING: Disabling FASTJET3 - header fastjet/config.h missing.
WARNING: Disabling FASTJET3 - library fastjet missing.
WARNING: Disabling HEPMC2 - header HepMC/GenEvent.h missing.
WARNING: Disabling HEPMC2 - library HepMC missing.
WARNING: Disabling HEPMC3 - header HepMC/GenEvent.h missing.
WARNING: Disabling HEPMC3 - library HepMC missing.
WARNING: Disabling LHAPDF5 - library LHAPDF missing.
WARNING: Disabling LHAPDF6 - header LHAPDF/LHAPDF.h missing.
WARNING: Disabling LHAPDF6 - library LHAPDF missing.
WARNING: Disabling POWHEG - binary hvq missing.
WARNING: Disabling PROMC - header src/ProMCBook.h missing.
WARNING: Disabling PROMC - library promc missing.
WARNING: Disabling ROOT - binary rootcint missing.
WARNING: Disabling ROOT - binary root-config missing.
WARNING: Disabling ROOT - header TH1D.h missing.
WARNING: Disabling PYTHON - header Python.h missing.
---------------------------------------------------------------------
|                    PYTHIA Configuration Summary                   |
---------------------------------------------------------------------
Configured for LINUX with the following options:
--enable-shared

The following optional external packages will be used:
* GZIP
* BOOST

And

==> Entering fakeroot environment...
==> Starting package()...
install: cannot stat '/build/pythia/src/pythia8235/lib/_pythia8.so': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...

The _pythia8.so is gone.

Please check the dependencies.

kgizdov commented on 2016-10-17 14:41

This works and is tested:
https://gist.github.com/kgizdov/c92a145bfa376c0bbcf7c3290965b8e8

Please test for yourself and see how it works. I've fixed the following:
- package include & lib folders must be specified manually or we end up linking to './' which is bad
- python correctly identifies paths on it's own and load the package correctly
- boost-libs is enough as dependency as it includes zlib

* Pro-tip: run 'namcap' on your PKGBUILD and package to make sure everything is fine

kgizdov commented on 2016-10-17 13:30

Actually, you cannot just install the pythia8.py file into site-packages as it is statically linked to the C++ binary and needs to be in the same folder. See this:

kgizdov@arch ~ python /usr/lib/python3.5/site-packages/pythia8.py
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/pythia8.py", line 94, in swig_import_helper
fp, pathname, description = imp.find_module('_pythia8', [dirname(__file__)])
File "/usr/lib/python3.5/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pythia8'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/pythia8.py", line 104, in <module>
_pythia8 = swig_import_helper()
File "/usr/lib/python3.5/site-packages/pythia8.py", line 96, in swig_import_helper
import _pythia8
ImportError: No module named '_pythia8'

We need to make sure _pythia8.so and __pycache__ are available in the correct folders. I will update the Gist of the PKGBUILD when I have something concrete.

JP-Ellis commented on 2016-10-15 03:24

I created the patch on the makefile originally because I did not see the `--enable-shared` option for ./configure (though I did look... obviously not well enough). I agree that the configuration option should definitely be preferred.