View previous topic :: View next topic |
Author |
Message |
Dark _Templar n00b
Joined: 02 Dec 2022 Posts: 29 Location: Prague
|
Posted: Sun Mar 19, 2023 9:25 pm Post subject: make install cant acsess install destination |
|
|
I am writing an ebuild script to build xflr5. I managed to get it working to the point, where it compiles withou any errors, but when i call emake install, it complains about beeing denied acsess to install destinations. That got me curious, so I tried going to the source and preforming the step manually as superuser by runing sudo make install. This installs all teh files without any problem. If I try to run my ebuild again, it compiles fine, starts src_install function and starts complaining about premisions. Any Idea why ?
Here is the ebuild https://bpa.st/CDO7U
here is my emerge --info https://bpa.st/4QW76 |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 324 Location: Naarm/Melbourne, Australia
|
Posted: Mon Mar 20, 2023 2:27 am Post subject: |
|
|
Are you already familiar with the Install Destinations section of the Dev Manual? |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30894 Location: here
|
Posted: Mon Mar 20, 2023 6:10 am Post subject: |
|
|
Before merging ebuild install all file in a sandbox - usually located in /var/tmp/portage/<category>/<pachage>/image - if in this phase the build system of the package try to install something outside you get and ACCESS_DENIED error.
If the build system is correct coded you can try to change emake install with emake DESTDIR="${D}" install or even more simply:
Code: | src_install() {
default # call parent src_install
newicon images/xflr5.png xflr5.png || die "newicon failed"
make_desktop_entry /usr/bin/xflr5 XFLR5 /usr/share/pixmaps/xflr5.png Science
} |
If you use default ebuild install function you can omit die function because it is already called by the install function. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
Dark _Templar n00b
Joined: 02 Dec 2022 Posts: 29 Location: Prague
|
Posted: Mon Mar 20, 2023 8:10 am Post subject: |
|
|
Thanks for the reply, I tried changing emake install to default, but it stil complains about sandbox acsess violation. Same with emake DESTDIR="${D}" install. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30894 Location: here
|
Posted: Mon Mar 20, 2023 8:29 am Post subject: |
|
|
Based on pkgbuild you can try with:
Code: | src_configure() {
eqmake5 PREFIX="/usr"
}
src_install() {
emake install INSTALL_ROOT="${D}"
newicon images/xflr5.png xflr5.png || die "newicon failed"
make_desktop_entry /usr/bin/xflr5 XFLR5 /usr/share/pixmaps/xflr5.png Science
} |
you can omit src_compile _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
Dark _Templar n00b
Joined: 02 Dec 2022 Posts: 29 Location: Prague
|
Posted: Mon Mar 20, 2023 8:32 pm Post subject: |
|
|
Oki so i tried changing the script as fedeliallalinea sougested whitch worked and install function isnt complaining. But postinst is. About multilib-strict check. It says: Code: | Files matching a file type that is not allowed:
usr/lib/libXFoil.so.1.0.0 |
So what does it mean ?
Here is whole output for reference
https://bpa.st/SCH3S |
|
Back to top |
|
|
Dark _Templar n00b
Joined: 02 Dec 2022 Posts: 29 Location: Prague
|
Posted: Mon Mar 20, 2023 8:41 pm Post subject: |
|
|
When I merge it with ebuild it works just fine, whitch is wierd |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30894 Location: here
|
Posted: Mon Mar 20, 2023 8:53 pm Post subject: |
|
|
The problem is caused by library is installed in wrong directory, /usr/lib instead of /usr/lib64.
Try also adding the variable LIBPREFIX="/usr/$(get_libdir)" to the eqmake command (see x11-wm/lumina/lumina-1.6.0.ebuild). _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
Dark _Templar n00b
Joined: 02 Dec 2022 Posts: 29 Location: Prague
|
Posted: Mon Mar 20, 2023 9:23 pm Post subject: |
|
|
Added LIBPREFIX="/usr/$(get_libdir) as argument to eqmake, but the problem persists. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30894 Location: here
|
Posted: Tue Mar 21, 2023 6:57 am Post subject: |
|
|
I don't know qmake build system but the problem seems into xflr5/XFoil-lib/XFoil-lib.pro
Code: | linux-g++{
isEmpty(PREFIX){
PREFIX = /usr/local
}
target.path = $$PREFIX/lib
INSTALLS += target
} |
This force to install the .so library in PREFIX/lib. Try to add
Code: | src_prepare() {
default
sed -i "s/\/lib/\/$(get_libdir)/" XFoil-lib/XFoil-lib.pro || die
} |
to patch wrong install lib path.
I'm not sure if is the best way to solve the problem. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
|