Home Help Center

Ice 3.0.0 and Gentoo ebuild

kovacmkovacm Member Michal KovacOrganization: Charles University in PragueProject: Ferda Data Mining ✭✭
Hi,

I am trying to create ebuild file for Gentoo Linux, but I have one problem. Gentoo needs Ice to be compiled ("installed") inside other directory than where it will reside later. For example, if I want to have Ice in opt/Ice-3.0.0/ I have to make install in /var/tmp/portage/ice-3.0.0/image/opt/Ice-3.0.0/

Problem is that if I compile Ice with conf/Make.Rules with line:
prefix = /var/tmp/portage/ice-3.0.0/image/opt/Ice-3.0.0

than in some binary files is written this full path (it was not so before 3.0.0 version) and Gentoo knows it so compilation will fail.

Is there any work around?

Thanks

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Sorry, its not exactly clear what you are talking about. What binary files is the prefix written into?
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    During the build, prefix is used as the embedded path in binaries. During the installation, it's used as the installation's root directory.

    So one solution would be to use different prefix values during the build and the installation.

    In previous releases, Ice did not embed any path in binaries. You could also revert to this old behavior by editing config/Make.rules.Linux.

    Cheers,
    Bernard
  • beaglesbeagles Member Brent EaglesOrganization: Eagles Technologies IncProject: Asterisk SCF ✭✭✭
    If you are referring to the rpath linker directive then you might want to try building Ice with the prefix set to the ultimate location of the binaries (e.g. /usr/bin, /opt/Ice-3.0.0, etc) and then running 'make install' with the prefix for portage build directory. The first 'make' embeds the correct path and 'make install' ends up simply copying the files to the portage build directory.

    Alternatively, you can modify the 'install_libdir' definition in 'Make.rules' to refer to the final installation directory instead of the value of $(prefix)/lib before 'make install' is run.

    If the rpath linker directive embedding the library path isn't the problem, could you elaborate what the precise issue is?

    Cheers
  • beaglesbeagles Member Brent EaglesOrganization: Eagles Technologies IncProject: Asterisk SCF ✭✭✭
    I'm sorry, but it looks like I need more coffee. I'm pretty sure my second suggestion of modfiying the 'install_libdir' variable won't work in the ebuild process as it is used when copying the library in the 'make install'. Where I was going with this was that you want the LDPLATFORMFLAGS in Make.rules.Linux to have the correct value for the rpath directive. The most direct route would be to modify this line directly, i.e. change:

    LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,$(install_libdir)

    to

    LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,/opt/Ice-3.0.0/lib

    or something like that.

    That being said, the first suggestion might be the easiest. It is essentially the same 'trick' we use when packaging up our binary distributions.

    Sorry for the confusion.

    Cheers
Sign In or Register to comment.