Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
make install cant acsess install destination
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Dark _Templar
n00b
n00b


Joined: 02 Dec 2022
Posts: 29
Location: Prague

PostPosted: Sun Mar 19, 2023 9:25 pm    Post subject: make install cant acsess install destination Reply with quote

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
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 324
Location: Naarm/Melbourne, Australia

PostPosted: Mon Mar 20, 2023 2:27 am    Post subject: Reply with quote

Are you already familiar with the Install Destinations section of the Dev Manual?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30894
Location: here

PostPosted: Mon Mar 20, 2023 6:10 am    Post subject: Reply with quote

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
View user's profile Send private message
Dark _Templar
n00b
n00b


Joined: 02 Dec 2022
Posts: 29
Location: Prague

PostPosted: Mon Mar 20, 2023 8:10 am    Post subject: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30894
Location: here

PostPosted: Mon Mar 20, 2023 8:29 am    Post subject: Reply with quote

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
View user's profile Send private message
Dark _Templar
n00b
n00b


Joined: 02 Dec 2022
Posts: 29
Location: Prague

PostPosted: Mon Mar 20, 2023 8:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dark _Templar
n00b
n00b


Joined: 02 Dec 2022
Posts: 29
Location: Prague

PostPosted: Mon Mar 20, 2023 8:41 pm    Post subject: Reply with quote

When I merge it with ebuild it works just fine, whitch is wierd
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30894
Location: here

PostPosted: Mon Mar 20, 2023 8:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dark _Templar
n00b
n00b


Joined: 02 Dec 2022
Posts: 29
Location: Prague

PostPosted: Mon Mar 20, 2023 9:23 pm    Post subject: Reply with quote

Added LIBPREFIX="/usr/$(get_libdir) as argument to eqmake, but the problem persists.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30894
Location: here

PostPosted: Tue Mar 21, 2023 6:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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