neurolabusc / surf-ice

GLSL surface rendering source code. Compiled versions available from NITRC. Loads 3DS, CTM, DXF, FreeSurfer, GII (GIfTI), GTS, LWO2, MS3D, MZ3, NV (BrainNetViewer), OBJ, OFF, PLY, STL, VTK. Tractography formats include BFloat, PDB, TCK, TRK, and VTK. Also NIfTI format voxelwise images.
https://www.nitrc.org/plugins/mwiki/index.php/surfice:MainPage
BSD 2-Clause "Simplified" License
101 stars 23 forks source link

python4lazarus dependency #14

Closed TheChymera closed 5 years ago

TheChymera commented 6 years ago

I am trying to install the newest version: https://github.com/neurolabusc/surf-ice/archive/v1.0.20180622.tar.gz and I am getting the following build log:

 * Package:    sci-visualization/surf-ice-1.0.20180622
 * Repository: local
 * Maintainer: sci@gentoo.org horea.christ@gmail.com
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking surf-ice-1.0.20180622.tar.gz to /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work
>>> Source unpacked in /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work
>>> Preparing source in /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622 ...
SetupCompilerFilename: Searching compiler ...
SearchCompilerCandidates Value=fpc File=/usr/bin/fpc
Hint: (lazarus) [RunTool] /usr/bin/fpc "-iWTOTP"
Hint: (lazarus) [RunTool] /usr/bin/fpc "-va" "compilertest.pas"
SetupCompilerFilename: using /usr/bin/fpc
Hint: (lazarus) storing Lazarus directory "/usr/share/lazarus/" Compiler path "/usr/bin/fpc" in "/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/homedir/.lazarus/environmentoptions.xml"
Error: (lazbuild) Broken dependency: python4lazarus_package
 * ERROR: sci-visualization/surf-ice-1.0.20180622::local failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_compile
 *   environment, line 2203:  Called die
 * The specific snippet of code:
 *       lazbuild -B --lazarusdir="/usr/share/lazarus/" surfice.lpi || die
 * 
 * If you need support, post the output of `emerge --info '=sci-visualization/surf-ice-1.0.20180622::local'`,
 * the complete build log and the output of `emerge -pqv '=sci-visualization/surf-ice-1.0.20180622::local'`.
 * The complete build log is located at '/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622'
 * S: '/var/tmp/portage/sci-visualization/surf-ice-1.0.20180622/work/surf-ice-1.0.20180622'

I guess I need and am missing the python4lazarus_package. I'm lookig to package it for Gentoo so that the dependency can be handled automatically, but I'm not sure where the source code is located. Is it here?

neurolabusc commented 6 years ago

Yes, I use the Github repository. As noted one the main page, you can set your own opts.inc - if you remove {$DEFINE MYPY} the software should not need this package. However, the dependency may also need to be removed in the project inspector. I have never worked out how to dynamically remove package dependencies (I have requested this feature for the Lazarus IDE).

TheChymera commented 6 years ago

Ok, so I installed python4lazarus, with:

lazbuild -B --lazarusdir="/usr/share/lazarus/" python4lazarus/python4lazarus_package.lpk 

But it seems it's not properly detected when I try to build surf-ice. Please see the full log.

Any ideas?

TheChymera commented 6 years ago

Also, any idea how I can reach @Alexey-T ? His repo seems to not have an issue tracker, and I can't find an email address on his profile. Basicall I'm unsure what license his code is under (relevant for packaging), and it would be cool if it had a release so I can link to a static ~stable archive.

neurolabusc commented 6 years ago

I am not familiar with your distro, but it looks like you are building/compiling the package rather than installing it. I think you will want to explore lazbuild --add-package.

TheChymera commented 6 years ago

Ok, I tried to build with:

lazbuild -B --lazarusdir="/usr/share/lazarus/" --build-ide= --add-package python4lazarus/python4lazarus_package.lpk

And this seems to work for a bit, and then fails with one of two [1,2] access violation errors. Do you perhaps know what installing a lazarus .lpk package in the IDE entails? Does the file just get copied somewhere, or do files belonging to the lazarus package actually get modified in order for this to happen.

If the latter, the package management might start getting adventurous. IT would be really cool if just copying the file someplace would work.

neurolabusc commented 6 years ago

I have no experience with your Linux distribution, and the approach you are taking for Gentoo support is dissimilar to my approach for Debian. I suggest you look at your logs and parse the errors. Perhaps you can work with someone familiar with your distribution. On a quick glance I wonder if the issue is with file permissions, as you are requesting it to build in a specific folder and the system reports a read-only directory. I assume with Gentoo you can not sudo during a compile?

skipping read only directory /usr/share/lazarus/components/synedit/languages/
...
 lazbuild -B --lazarusdir="/usr/share/lazarus/"
TheChymera commented 6 years ago

I'm pretty sure it's about file permissions. The problem is, the files under /usr/share/lazarus belong to the lazarus package. If other packages start modifying them, there is no way to ascertain that they will be returned to their initial state once those packages are removed by the package manager.

How do you handle this on Debian?

neurolabusc commented 6 years ago

On my NeuroDebian VirtualBox Linux with default user (brain) i have Lazarus installed locally, so which lazarus returns /home/brain/lazarus/lazarus. You may want to look at this web page

neurolabusc commented 5 years ago

@TheChymera can we close this issue now? I do not have issues with Debian, and provide pre-compiled executables for typical users. While Gentoo support would be great, it is outside my expertise. If you can resolve this and close this issue, that would be great. I would be happy to include the python4lazarus_package source code with this repository if that makes it easier to distribute, but it will still require adding the package to Lazarus.

TheChymera commented 5 years ago

This issue has been solved on Gentoo Linux. Commit on the Gentoo package repository and longer description of implementation on the Lazarus forum.

neurolabusc commented 5 years ago

Fantastic.