Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trying to compile gPlates
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
DerUnsichtbareDritte
n00b
n00b


Joined: 14 Oct 2022
Posts: 8

PostPosted: Fri Oct 14, 2022 4:13 pm    Post subject: Trying to compile gPlates Reply with quote

Hey, I’m trying to compile gPlates (https://www.earthbyte.org/download-gplates-2-3/) from source, but I just can’t get it to work. I’m almost certain, that I have every dependency installed and I played around with a lot of useflags. I also tried good old googling, but failed to find anything useful. It seems like not a lot of people want to simulate tectonic plates movement in Gentoo...

This is the output from cmake . :
Code:

-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- Found GLEW: /usr/include (found version "2.2.0")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.12")
-- Found Boost: /usr/lib64/cmake/Boost-1.79.0/BoostConfig.cmake (found version "1.79.0")
-- Found Boost: /usr/lib64/cmake/Boost-1.79.0/BoostConfig.cmake (found suitable version "1.79.0", minimum required is "1.48")
-- Boost include dirs: /usr/include
-- Boost libraries:
-- Found Python3: /usr/bin/python3.10 (found version "3.10.8") found components: Interpreter Development NumPy Development.Module Development.Embed
-- Found Boost: /usr/lib64/cmake/Boost-1.79.0/BoostConfig.cmake (found suitable version "1.79.0", minimum required is "1.35")
-- Found Boost: /usr/lib64/cmake/Boost-1.79.0/BoostConfig.cmake (found suitable version "1.79.0", minimum required is "1.35") found components: program_options thread system python310 unit_test_framework numpy310
-- Found Qwt: /usr/lib64/libqwt6-qt5.so (found version "6.1.5")
-- Found GDAL: /usr/lib64/libgdal.so (found suitable version "3.5.0", minimum required is "1.3.2")
-- Found PROJ: /usr/lib64/cmake/proj/proj-config.cmake (found version "8.2.1")
-- Python embedding test passed.
-- Looking for doxygen...
-- Looking for doxygen... - found /usr/bin/doxygen
-- Looking for dot tool...
-- Looking for dot tool... - found /usr/bin/dot
-- Configuring done
-- Generating done
-- Build files have been written to: /home/finn/from_source/gplates_2.3.0_src

And the error I get while executing make is:

Code:
[ 44%] Building CXX object src/CMakeFiles/gplates-lib.dir/gui/TopologyTools.cc.o
/home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc: In Elementfunktion »boost::optional<__gnu_cxx::__normal_iterator<const GPlatesGui::TopologyTools::VisibleSection*, std::vector<GPlatesGui::TopologyTools::VisibleSection> > > GPlatesGui::TopologyTools::is_section_visible_boundary(std::vector<GPlatesGui::TopologyTools::SectionInfo>::size_type) const«:
/home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:3451:92: Fehler: »_1« wurde in diesem Gültigkeitsbereich nicht definiert
 3451 |                                         boost::bind(&VisibleSection::d_section_info_index, _1) ==
      |                                                                                            ^~
/home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:3451:92: Anmerkung: empfohlene Alternativen:
In Datei, eingebunden von /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 von /usr/include/boost/mpl/placeholders.hpp:43,
                 von /usr/include/boost/iterator/iterator_categories.hpp:16,
                 von /usr/include/boost/iterator/iterator_adaptor.hpp:14,
                 von /usr/include/boost/iterator/reverse_iterator.hpp:10,
                 von /usr/include/boost/range/reverse_iterator.hpp:21,
                 von /usr/include/boost/range/rend.hpp:19,
                 von /usr/include/boost/foreach.hpp:82,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: Anmerkung:   »mpl_::_1«
   29 | typedef arg<1> _1;
      |                ^~
In Datei, eingebunden von /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/pstl/glue_algorithm_defs.h:13,

                 von /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/algorithm:74,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:27:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/functional:225:34: Anmerkung:   »std::placeholders::_1«
  225 |     extern const _Placeholder<1> _1;
      |                                  ^~
In Datei, eingebunden von /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 von /usr/include/boost/mpl/placeholders.hpp:43,
                 von /usr/include/boost/iterator/iterator_categories.hpp:16,
                 von /usr/include/boost/iterator/iterator_adaptor.hpp:14,
                 von /usr/include/boost/iterator/reverse_iterator.hpp:10,
                 von /usr/include/boost/range/reverse_iterator.hpp:21,
                 von /usr/include/boost/range/rend.hpp:19,
                 von /usr/include/boost/foreach.hpp:82,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: Anmerkung:   »mpl_::_1«
   29 | typedef arg<1> _1;
      |                ^~
In Datei, eingebunden von /usr/include/boost/bind/bind.hpp:2336,
                 von /home/finn/from_source/gplates_2.3.0_src/src/utils/ReferenceCount.h:29,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/WeakReferenceCallback.h:35,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/WeakReference.h:37,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/Model.h:29,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/BasicHandle.h:39,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/FeatureHandle.h:35,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologySectionsContainer.h:37,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.h:37,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:54:
/usr/include/boost/bind/placeholders.hpp:46:38: Anmerkung:   »boost::placeholders::_1«
   46 | BOOST_INLINE_CONSTEXPR boost::arg<1> _1;
      |                                      ^~
In Datei, eingebunden von /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 von /usr/include/boost/mpl/placeholders.hpp:43,
                 von /usr/include/boost/iterator/iterator_categories.hpp:16,
                 von /usr/include/boost/iterator/iterator_adaptor.hpp:14,
                 von /usr/include/boost/iterator/reverse_iterator.hpp:10,
                 von /usr/include/boost/range/reverse_iterator.hpp:21,
                 von /usr/include/boost/range/rend.hpp:19,
                 von /usr/include/boost/foreach.hpp:82,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: Anmerkung:   »mpl_::_1«
   29 | typedef arg<1> _1;
      |                ^~
In Datei, eingebunden von /usr/include/boost/lambda/bind.hpp:15,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:35:
/usr/include/boost/lambda/core.hpp:71:60: Anmerkung:   »boost::lambda::{anonymous}::_1«
   71 |   boost::lambda::placeholder1_type& BOOST_ATTRIBUTE_UNUSED _1 = free1;
      |                                                            ^~
/home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc: In Elementfunktion »boost::optional<__gnu_cxx::__normal_iterator<const GPlatesGui::TopologyTools::VisibleSection*, std::vector<GPlatesGui::TopologyTools::VisibleSection> > > GPlatesGui::TopologyTools::is_section_visible_interior(std::vector<GPlatesGui::TopologyTools::SectionInfo>::size_type) const«:
/home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:3470:92: Fehler: »_1« wurde in diesem Gültigkeitsbereich nicht definiert
 3470 |                                         boost::bind(&VisibleSection::d_section_info_index, _1) ==
      |                                                                                            ^~
/home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:3470:92: Anmerkung: empfohlene Alternativen:
In Datei, eingebunden von /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 von /usr/include/boost/mpl/placeholders.hpp:43,
                 von /usr/include/boost/iterator/iterator_categories.hpp:16,
                 von /usr/include/boost/iterator/iterator_adaptor.hpp:14,
                 von /usr/include/boost/iterator/reverse_iterator.hpp:10,
                 von /usr/include/boost/range/reverse_iterator.hpp:21,
                 von /usr/include/boost/range/rend.hpp:19,
                 von /usr/include/boost/foreach.hpp:82,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: Anmerkung:   »mpl_::_1«
   29 | typedef arg<1> _1;
      |                ^~
In Datei, eingebunden von /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/pstl/glue_algorithm_defs.h:13,

                 von /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/algorithm:74,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:27:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/functional:225:34: Anmerkung:   »std::placeholders::_1«
  225 |     extern const _Placeholder<1> _1;
      |                                  ^~
In Datei, eingebunden von /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 von /usr/include/boost/mpl/placeholders.hpp:43,
                 von /usr/include/boost/iterator/iterator_categories.hpp:16,
                 von /usr/include/boost/iterator/iterator_adaptor.hpp:14,
                 von /usr/include/boost/iterator/reverse_iterator.hpp:10,
                 von /usr/include/boost/range/reverse_iterator.hpp:21,
                 von /usr/include/boost/range/rend.hpp:19,
                 von /usr/include/boost/foreach.hpp:82,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: Anmerkung:   »mpl_::_1«
   29 | typedef arg<1> _1;
      |                ^~
In Datei, eingebunden von /usr/include/boost/bind/bind.hpp:2336,
                 von /home/finn/from_source/gplates_2.3.0_src/src/utils/ReferenceCount.h:29,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/WeakReferenceCallback.h:35,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/WeakReference.h:37,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/Model.h:29,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/BasicHandle.h:39,
                 von /home/finn/from_source/gplates_2.3.0_src/src/model/FeatureHandle.h:35,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologySectionsContainer.h:37,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.h:37,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:54:
/usr/include/boost/bind/placeholders.hpp:46:38: Anmerkung:   »boost::placeholders::_1«
   46 | BOOST_INLINE_CONSTEXPR boost::arg<1> _1;
      |                                      ^~
In Datei, eingebunden von /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 von /usr/include/boost/mpl/placeholders.hpp:43,
                 von /usr/include/boost/iterator/iterator_categories.hpp:16,
                 von /usr/include/boost/iterator/iterator_adaptor.hpp:14,
                 von /usr/include/boost/iterator/reverse_iterator.hpp:10,
                 von /usr/include/boost/range/reverse_iterator.hpp:21,
                 von /usr/include/boost/range/rend.hpp:19,
                 von /usr/include/boost/foreach.hpp:82,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: Anmerkung:   »mpl_::_1«
   29 | typedef arg<1> _1;
      |                ^~
In Datei, eingebunden von /usr/include/boost/lambda/bind.hpp:15,
                 von /home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:35:
/usr/include/boost/lambda/core.hpp:71:60: Anmerkung:   »boost::lambda::{anonymous}::_1«
   71 |   boost::lambda::placeholder1_type& BOOST_ATTRIBUTE_UNUSED _1 = free1;
      |                                                            ^~
make[2]: *** [src/CMakeFiles/gplates-lib.dir/build.make:6210: src/CMakeFiles/gplates-lib.dir/gui/TopologyTools.cc.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:484: src/CMakeFiles/gplates-lib.dir/all] Fehler 2
make: *** [Makefile:156: all] Fehler 2

I don’t know how to get make to display a English version of the Error, I’m sorry for that ):
Any help to get this to work is appreciated

[Moderator edit: added [code] tags to preserve output layout; broke long whitespace-free lines in code tags to fix thread layout. -Hu]
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3934

PostPosted: Fri Oct 14, 2022 5:53 pm    Post subject: Reply with quote

Welcome to Gentoo Forums!
This
Code:

/home/finn/from_source/gplates_2.3.0_src/src/gui/TopologyTools.cc:3451:92: error: '_1' was not defined in this scope

is your error.
you need to create your own ebuild.
The way you proceed is not proper.
At least lobby the community to create an ebuild for this package.
plz see also
https://stackoverflow.com/questions/62737525/how-to-fix-error-1-was-not-declared-in-this-scope
_________________
:)


Last edited by alamahant on Fri Oct 14, 2022 6:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
DerUnsichtbareDritte
n00b
n00b


Joined: 14 Oct 2022
Posts: 8

PostPosted: Fri Oct 14, 2022 5:57 pm    Post subject: Reply with quote

And how do i do that?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22918

PostPosted: Fri Oct 14, 2022 6:27 pm    Post subject: Re: Trying to compile gPlates Reply with quote

DerUnsichtbareDritte wrote:
I don’t know how to get make to display a English version of the Error, I’m sorry for that ):[/i]
Set LC_MESSAGES=C in the make process. Normally, Portage's default make.conf would do this for you when building through an ebuild, but if you build outside Portage, it is your responsibility.

I don't think an ebuild is a requirement to build this - but I do think it would be a decent way to wrap up whatever setup / teardown is required around the package's own build script.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2887

PostPosted: Sat Oct 15, 2022 8:28 am    Post subject: Reply with quote

The _1 thing is typically incompatibility with >=boost-1.73 or around there (e.g. bug #724316 for a different package), and downgrading boost system-wide would be a poor solution and likely break other packages instead (<1.73 is not even in tree anymore, we're on 1.79+1.80 now).

The package needs to be fixed ideally, perhaps already is in development (stable 2.3 is a year old), but I have no idea where to see that (is there even a public repo?).
Back to top
View user's profile Send private message
DerUnsichtbareDritte
n00b
n00b


Joined: 14 Oct 2022
Posts: 8

PostPosted: Sat Oct 15, 2022 12:41 pm    Post subject: Reply with quote

So i tried to write the ebuild, but the error persists ):
The ebuild:
Code:

# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
 

EAPI=8




S="${WORKDIR}/${PN}_${PV}_src"


DESCRIPTION="GPlates is desktop software for the interactive visualisation of plate tectonics."
HOMEPAGE="https://www.gplates.org/"
SRC_URI="https://www.earthbyte.org/download/8426/ -> ${P}.zip"
 
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
#IUSE=""
 
DEPEND=">=dev-libs/boost-1.35 >=sci-mathematics/cgal-4.7 >=dev-util/cmake-3.10 >=sci-libs/gdal-1.3.2 media-libs/glew >=sci-libs/proj-4.6 >=dev-lang/python-3.7 >=dev-qt/qtcore-5.6 >=x11>
RDEPEND="${DEPEND}"
#BDEPEND=""
src_configure()
{
        cmake .
}
src_install()
{
        make install
}
Back to top
View user's profile Send private message
DerUnsichtbareDritte
n00b
n00b


Joined: 14 Oct 2022
Posts: 8

PostPosted: Sat Oct 15, 2022 12:50 pm    Post subject: Reply with quote

Ionen wrote:
The _1 thing is typically incompatibility with >=boost-1.73 or around there (e.g. bug #724316 for a different package), and downgrading boost system-wide would be a poor solution and likely break other packages instead (<1.73 is not even in tree anymore, we're on 1.79+1.80 now).

The package needs to be fixed ideally, perhaps already is in development (stable 2.3 is a year old), but I have no idea where to see that (is there even a public repo?).

There is this betaversion https://www.earthbyte.org/download-pygplates-0-36/
Back to top
View user's profile Send private message
DerUnsichtbareDritte
n00b
n00b


Joined: 14 Oct 2022
Posts: 8

PostPosted: Sat Oct 15, 2022 3:12 pm    Post subject: Reply with quote

The beta version compiles successfully , but fails to install
my ebuilt gplates-2.36.0.ebuild:
Code:

# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
 

EAPI=8




S="${WORKDIR}/py${PN}_0.$(ver_cut 2-)_src"


DESCRIPTION="GPlates is desktop software for the interactive visualisation of plate tectonics."
HOMEPAGE="https://www.gplates.org/"
SRC_URI="https://www.earthbyte.org/download/9112 -> ${P}.zip"
 
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
#IUSE=""
 
DEPEND=">=dev-libs/boost-1.35 >=sci-mathematics/cgal-4.7 >=dev-util/cmake-3.10 >=sci-libs/gdal-1.3.2 media-libs/glew >=sci-libs/proj-4.6 >=dev-lang/python-3.7 >=dev-qt/qtcore-5.6 >=x11>
RDEPEND="${DEPEND}"
#BDEPEND=""
src_configure()
{
        cmake .
}
src_compile()
{
        make
}
src_install()
{
        make install
}

Error:

Code:

>>> Install sci-geosciences/gplates-2.36.0 into /var/tmp/portage/sci-geosciences/gplates-2.36.0/image
[  1%] Automatic MOC and UIC for target pygplates
[  1%] Built target pygplates_autogen
Consolidate compiler generated dependencies of target pygplates
[100%] Built target pygplates
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib64/pygplates.so
 * ACCESS DENIED:  unlink:        /usr/local/lib64/pygplates.so
 * ACCESS DENIED:  open_wr:       /usr/local/lib64/pygplates.so
 * ACCESS DENIED:  unlink:        /usr/local/lib64/pygplates.so
 * ACCESS DENIED:  fopen_wr:      /usr/local/lib64/pygplates.so
CMake Error at src/cmake_install.cmake:157 (file):
  file INSTALL cannot copy file
  "/var/tmp/portage/sci-geosciences/gplates-2.36.0/work/pygplates_0.36.0_src/bin/pygplates.so"
  to "/usr/local/lib64/pygplates.so": Permission denied.
Call Stack (most recent call first):
  cmake_install.cmake:47 (include)


make: *** [Makefile:120: install] Error 1
>>> Completed installing sci-geosciences/gplates-2.36.0 into /var/tmp/portage/sci-geosciences/gplates-2.36.0/image

 * Final size of build directory: 492988 KiB (481.4 MiB)
 * Final size of installed tree:       4 KiB

 * ----------------------- SANDBOX ACCESS VIOLATION SUMMARY -----------------------
 * LOG FILE: "/var/tmp/portage/sci-geosciences/gplates-2.36.0/temp/sandbox.log"
 *
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: unlink
S: deny
P: /usr/local/lib64/pygplates.so
A: /usr/local/lib64/pygplates.so
R: /usr/local/lib64/pygplates.so
C: /usr/bin/cmake -P cmake_install.cmake

F: open_wr
S: deny
P: /usr/local/lib64/pygplates.so
A: /usr/local/lib64/pygplates.so
R: /usr/local/lib64/pygplates.so
C: /usr/bin/cmake -P cmake_install.cmake

F: unlink
S: deny
P: /usr/local/lib64/pygplates.so
A: /usr/local/lib64/pygplates.so
R: /usr/local/lib64/pygplates.so
C: /usr/bin/cmake -P cmake_install.cmake

F: fopen_wr
S: deny
P: /usr/local/lib64/pygplates.so
A: /usr/local/lib64/pygplates.so
R: /usr/local/lib64/pygplates.so
C: /usr/bin/cmake -P cmake_install.cmake
 * --------------------------------------------------------------------------------

>>> Failed to emerge sci-geosciences/gplates-2.36.0, Log file:


I probably just made a stupid mistake in the ebuild, I never made one before…
Also, can someone please tell me how to get the opts variable to work in the Ebuild? Compiling this takes ages...
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22918

PostPosted: Sat Oct 15, 2022 4:08 pm    Post subject: Reply with quote

DerUnsichtbareDritte wrote:
So i tried to write the ebuild, but the error persists ):
Yes, the ebuild is just good practice in other areas. It will not automatically patch the source to fix this problem.
DerUnsichtbareDritte wrote:
The beta version compiles successfully , but fails to install
my ebuilt gplates-2.36.0.ebuild:
Code:
src_configure()
{
        cmake .
}
src_compile()
{
        make
}
src_install()
{
        make install
}
Error:
Code:
-- Installing: /usr/local/lib64/pygplates.so
This path is incorrect. It should be installed in /usr/lib64, not /usr/local/lib64. This is likely because your invocation of cmake did not set the library path. Using the cmake eclass helpers may handle this for you.
DerUnsichtbareDritte wrote:
Code:
 * ACCESS DENIED:  unlink:        /usr/local/lib64/pygplates.so
The build tried to install directly to the live filesystem. This is not allowed. It should install to the staging area $D, so that Portage can track what is installed. This would likely be handled for you if you remove your definition of src_install; the Portage default definition is probably better than your explicit one.
DerUnsichtbareDritte wrote:
Also, can someone please tell me how to get the opts variable to work in the Ebuild? Compiling this takes ages...
Remove your definition of src_compile. The Portage default definition will use a helper that passes the option automatically.
Back to top
View user's profile Send private message
DerUnsichtbareDritte
n00b
n00b


Joined: 14 Oct 2022
Posts: 8

PostPosted: Sat Oct 15, 2022 9:14 pm    Post subject: Reply with quote

Hu wrote:
DerUnsichtbareDritte wrote:
So i tried to write the ebuild, but the error persists ):
Yes, the ebuild is just good practice in other areas. It will not automatically patch the source to fix this problem.
DerUnsichtbareDritte wrote:
The beta version compiles successfully , but fails to install
my ebuilt gplates-2.36.0.ebuild:
Code:
src_configure()
{
        cmake .
}
src_compile()
{
        make
}
src_install()
{
        make install
}
Error:
Code:
-- Installing: /usr/local/lib64/pygplates.so
This path is incorrect. It should be installed in /usr/lib64, not /usr/local/lib64. This is likely because your invocation of cmake did not set the library path. Using the cmake eclass helpers may handle this for you.
DerUnsichtbareDritte wrote:
Code:
 * ACCESS DENIED:  unlink:        /usr/local/lib64/pygplates.so
The build tried to install directly to the live filesystem. This is not allowed. It should install to the staging area $D, so that Portage can track what is installed. This would likely be handled for you if you remove your definition of src_install; the Portage default definition is probably better than your explicit one.
DerUnsichtbareDritte wrote:
Also, can someone please tell me how to get the opts variable to work in the Ebuild? Compiling this takes ages...
Remove your definition of src_compile. The Portage default definition will use a helper that passes the option automatically.

Thanks, that worked (:
But now that that packege is installed i realised something, Its the py version, so no GUI. ):
I maneged to fix the compiler errors in first package by changing the source by hand.
the thing is, i don't wan't to change the source by hand, I want Portage to do that for me!
So i tried to write a Patch, but it doas not work...
Ebuild:
Code:
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
 

EAPI=8
inherit cmake


S="${WORKDIR}/${PN}_${PV}_src"


DESCRIPTION="GPlates is desktop software for the interactive visualisation of plate tectonics."
HOMEPAGE="https://www.gplates.org/"
SRC_URI="https://www.earthbyte.org/download/8426/ -> ${P}.zip"
 
PATCHES=("${FILESDIR}/stuff.patch")
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
#IUSE=""
 
DEPEND=">=dev-libs/boost-1.35 >=sci-mathematics/cgal-4.7 >=dev-util/cmake-3.10 >=sci-libs/gdal-1.3.2 media-libs/glew >=sci-libs/proj-4.6 >=dev-lang/python-3.7 >=dev-qt/qtcore-5.6 >=x11>
RDEPEND="${DEPEND}"
#BDEPEND=""
src_configure()
{
        cmake_src_configure
}


patch(in files/stuff.patch):
Code:

diff --git a/src/gui/TopologyTools.cc b/src/gui/TopologyTools.cc
index 2746184..3fbf85f 100644
--- a/src/gui/TopologyTools.cc
+++ b/src/gui/TopologyTools.cc
@@ -3448,7 +3448,7 @@ GPlatesGui::TopologyTools::is_section_visible_boundary(
          std::find_if(
                d_visible_boundary_section_seq.begin(),
                d_visible_boundary_section_seq.end(),
-               boost::bind(&VisibleSection::d_section_info_index, _1) ==
+               boost::bind(&VisibleSection::d_section_info_index, boost::placeholders::_1) ==
                   boost::cref(section_index));
 
    if (visible_section_iter == d_visible_boundary_section_seq.end())
@@ -3467,7 +3467,7 @@ GPlatesGui::TopologyTools::is_section_visible_interior(
          std::find_if(
                d_visible_interior_section_seq.begin(),
                d_visible_interior_section_seq.end(),
-               boost::bind(&VisibleSection::d_section_info_index, _1) ==
+               boost::bind(&VisibleSection::d_section_info_index, boost::placeholders::_1) ==
                   boost::cref(section_index));
 
    if (visible_section_iter == d_visible_interior_section_seq.end())
diff --git a/src/presentation/ReconstructionGeometryRenderer.cc b/src/presentation/ReconstructionGeometryRenderer.cc
index fc308ac..eace946 100644
--- a/src/presentation/ReconstructionGeometryRenderer.cc
+++ b/src/presentation/ReconstructionGeometryRenderer.cc
@@ -274,6 +274,7 @@ void
 GPlatesPresentation::ReconstructionGeometryRenderer::RenderParamsPopulator::visit_reconstruct_visual_layer_params(
       const ReconstructVisualLayerParams &params)
 {
+   using namespace boost::placeholder;
    d_render_params.show_vgp = boost::bind(&ReconstructVisualLayerParams::show_vgp, &params, _1, _2);
    d_render_params.vgp_draw_circular_error = params.get_vgp_draw_circular_error();
    d_render_params.fill_polygons = params.get_fill_polygons();



output of ebuild gplates-2.3.0.ebuild clean test install:
Code:

Forcing test.
 * gplates-2.3.0.zip BLAKE2B SHA512 size ;-) ...                                                                                                                                  [ ok ]
>>> Unpacking source...
>>> Unpacking gplates-2.3.0.zip to /var/tmp/portage/sci-geosciences/gplates-2.3.0/work
>>> Source unpacked in /var/tmp/portage/sci-geosciences/gplates-2.3.0/work
>>> Preparing source in /var/tmp/portage/sci-geosciences/gplates-2.3.0/work/gplates_2.3.0_src ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-geosciences/gplates-2.3.0/work/gplates_2.3.0_src"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-geosciences/gplates-2.3.0/work/gplates_2.3.0_src_build"
 * Applying stuff.patch ...
patching file src/gui/TopologyTools.cc
Hunk #1 FAILED at 3448 (different line endings).
Hunk #2 FAILED at 3467 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/gui/TopologyTools.cc.rej
patching file src/presentation/ReconstructionGeometryRenderer.cc
Hunk #1 FAILED at 274 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/presentation/ReconstructionGeometryRenderer.cc.rej                                                                           [ !! ]
 * ERROR: sci-geosciences/gplates-2.3.0::unsichtbar failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sci-geosciences/gplates-2.3.0/files/stuff.patch
 *
 * Call stack:
 *               ebuild.sh, line  122:  Called src_prepare
 *             environment, line 2130:  Called cmake_src_prepare
 *             environment, line 1075:  Called default_src_prepare
 *      phase-functions.sh, line  948:  Called __eapi8_src_prepare
 *             environment, line  325:  Called eapply '--' '/var/tmp/portage/sci-geosciences/gplates-2.3.0/files/stuff.patch'
 *             environment, line 1231:  Called _eapply_patch '/var/tmp/portage/sci-geosciences/gplates-2.3.0/files/stuff.patch'
 *             environment, line 1169:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/sci-geosciences/gplates-2.3.0/files/stuff.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=sci-geosciences/gplates-2.3.0::unsichtbar'`,
 * the complete build log and the output of `emerge -pqv '=sci-geosciences/gplates-2.3.0::unsichtbar'`.
 * The complete build log is located at '/var/tmp/portage/sci-geosciences/gplates-2.3.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-geosciences/gplates-2.3.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-geosciences/gplates-2.3.0/work/gplates_2.3.0_src'
 * S: '/var/tmp/portage/sci-geosciences/gplates-2.3.0/work/gplates_2.3.0_src'

Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22918

PostPosted: Sat Oct 15, 2022 9:26 pm    Post subject: Reply with quote

patch says different line endings. How did you generate the patch file?
Back to top
View user's profile Send private message
DerUnsichtbareDritte
n00b
n00b


Joined: 14 Oct 2022
Posts: 8

PostPosted: Sat Oct 15, 2022 9:33 pm    Post subject: Reply with quote

I followed this guide: https://wiki.gentoo.org/wiki/Creating_a_patch
then used scrub-patch
Back to top
View user's profile Send private message
DerUnsichtbareDritte
n00b
n00b


Joined: 14 Oct 2022
Posts: 8

PostPosted: Sun Oct 16, 2022 2:20 pm    Post subject: Reply with quote

Hey, thanks for the help everyone, it now works :D
I used strg c strg, v strg and not the generated file...
plus I missed some stuff
And i get this errormessage, but stuff works so who cares?
Code:

 * QA Notice: One or more compressed files were found in docompress-ed
 * directories. Please fix the ebuild not to install compressed files
 * (manpages, documentation) when automatic compression is used:
 *
 *   /usr/share/man/man1/gplates.1.gz


For everyone trying to compile gplates, here is the final patch:
Code:

--- a/src/gui/TopologyTools.cc
+++ b/src/gui/TopologyTools.cc
@@ -3448,7 +3448,7 @@ GPlatesGui::TopologyTools::is_section_visible_boundary(
          std::find_if(
                d_visible_boundary_section_seq.begin(),
                d_visible_boundary_section_seq.end(),
-               boost::bind(&VisibleSection::d_section_info_index, _1) ==
+               boost::bind(&VisibleSection::d_section_info_index, boost::placeholders::_1) ==
                   boost::cref(section_index));
 
    if (visible_section_iter == d_visible_boundary_section_seq.end())
@@ -3467,7 +3467,7 @@ GPlatesGui::TopologyTools::is_section_visible_interior(
          std::find_if(
                d_visible_interior_section_seq.begin(),
                d_visible_interior_section_seq.end(),
-               boost::bind(&VisibleSection::d_section_info_index, _1) ==
+               boost::bind(&VisibleSection::d_section_info_index, boost::placeholders::_1) ==
                   boost::cref(section_index));
 
    if (visible_section_iter == d_visible_interior_section_seq.end())
--- a/src/presentation/ReconstructionGeometryRenderer.cc
+++ b/src/presentation/ReconstructionGeometryRenderer.cc
@@ -274,6 +274,7 @@ void
 GPlatesPresentation::ReconstructionGeometryRenderer::RenderParamsPopulator::visit_reconstruct_visual_layer_params(
       const ReconstructVisualLayerParams &params)
 {
+   using namespace boost::placeholders;
    d_render_params.show_vgp = boost::bind(&ReconstructVisualLayerParams::show_vgp, &params, _1, _2);
    d_render_params.vgp_draw_circular_error = params.get_vgp_draw_circular_error();
    d_render_params.fill_polygons = params.get_fill_polygons();
--- a/src/presentation/VisualLayerRegistry.cc
+++ b/src/presentation/VisualLayerRegistry.cc
@@ -403,6 +403,7 @@ GPlatesPresentation::register_default_visual_layers(
       GPlatesPresentation::ViewState &view_state)
 {
    using namespace GPlatesAppLogic::LayerTaskType;
+   using namespace boost::placeholders;
 
    GPlatesGui::HTMLColourNames &html_colours = GPlatesGui::HTMLColourNames::instance();
    GPlatesAppLogic::ReconstructGraph &reconstruct_graph = application_state.get_reconstruct_graph();
--- a/src/qt-widgets/ViewportWindow.cc
+++ b/src/qt-widgets/ViewportWindow.cc
@@ -326,7 +326,7 @@ GPlatesQtWidgets::ViewportWindow::ViewportWindow(
          *d_geometry_operation_state_ptr,
          *d_modify_geometry_state,
          *d_measure_distance_state_ptr,
-         boost::bind(&canvas_tool_status_message, boost::ref(*this), _1),
+         boost::bind(&canvas_tool_status_message, boost::ref(*this), boost::placeholders::_1),
          get_view_state(),
          *this);
 
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum