Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
compile source without ebuild?
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
Palme
n00b
n00b


Joined: 31 May 2014
Posts: 51

PostPosted: Mon Nov 20, 2017 9:14 am    Post subject: compile source without ebuild? Reply with quote

HI
My Questions is based on this topic binary file and shared library issue

now i was able to get the source code form Our software distributor.

1. do i have to write an ebuild for the application so i can install it under gentoo? or can i compile the source in a conventional way?

here's an excerpt from the readme

Quote:
Requirements
------------
on UNIX:
Latest FPC ( We actually _highly_ recommand and support compilation using fpc 3.0+.)
Install latest FPC Version from http://www.freepascal.org/ (or use a package manager from your distro, only if up-to-date!)


For example, to install the compiler environnement on debian/ubuntu:

apt-get install fpc-source fp-compiler fp-docs fp-units-base fp-units-db fp-units-fcl fp-units-fv fp-units-gfx \
fp-units-math fp-units-misc fp-units-net fp-units-rtl fp-utils screen binutils libncurses-dev \
libncursesw5-dev libssl-dev libncurses5 libncursesw5-dbg

Compile

Change to the source directtory

# cd sources/Htflps

on UNIX:

# make Htflps_32 or make Htflps_64


and Here's my attempt at writing an ebuild :oops:

Code:

# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

DESCRIPTION=""
HOMEPAGE=""
SRC_URI="https://url/Htflps.tar.bz2"

LICENSE=" LGPL"
SLOT="5"
KEYWORDS="~amd64 ~x86"


DEPEND="
        <=sys-libs/ncurses-6.0
        >=dev-lang/fpc-3.0
        dev-libs/openssl
        dev-libs/expat
        sys-libs/zlib

        ssl? (
                gnutls? ( >=net-libs/gnutls-1.2.3:0= )
                !gnutls? (
                        !libressl? ( dev-libs/openssl:0= )
                )
        )
        verify-file? (
                dev-perl/String-CRC32
                virtual/perl-Digest-MD5
        )
"

DEPEND="
        ${RDEPEND}
        =sys-devel/libtool-2*
        app-arch/xz-utils
        nls? ( >=sys-devel/gettext-0.19 )
        virtual/pkgconfig
"
DOCS=(
        readme license
)


src_prepare() {
        default

        eautoreconf

        elibtoolize # for Darwin bundles
}





Maybe someone is so kind and can help me with writing the ebuild?

thanks


Last edited by Palme on Mon Nov 20, 2017 1:33 pm; edited 2 times in total
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7316
Location: ~Brussels - Belgique

PostPosted: Mon Nov 20, 2017 9:23 am    Post subject: Reply with quote

Hi!,

Can you provide the URL the package you want to build?
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Palme
n00b
n00b


Joined: 31 May 2014
Posts: 51

PostPosted: Mon Nov 20, 2017 9:39 am    Post subject: Reply with quote

Hi xaviermiller
Unfortunately, i'm not allowed to pass on to third party :oops:
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7316
Location: ~Brussels - Belgique

PostPosted: Mon Nov 20, 2017 9:48 am    Post subject: Reply with quote

Then you can take a look at existing packages depending on free pascal.

For example: dev-lang/lazarus, dev-util/diffoscope or sci-electronics/puff
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Palme
n00b
n00b


Joined: 31 May 2014
Posts: 51

PostPosted: Mon Nov 20, 2017 10:16 am    Post subject: Reply with quote

I updated the first post
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5323

PostPosted: Mon Nov 20, 2017 11:40 am    Post subject: Re: compile source without ebuild? Reply with quote

Palme wrote:
1. do i have to write an ebuild for the application so i can install it under gentoo?


No, but you really should.

Quote:
or can i compile the source in a conventional way?


You can compile and run programs outside of using portage, assuming you have the pre-requisites. eg:

Code:
wget www.example.com/package.tar.gz
tar -xzvf package.tar.gz
cd package
make
./program


The problem begins when people do stuff like "make install" or otherwise copying files onto the filesystem (like /bin /sbin /usr/bin /usr/sbin etc etc).
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 5981

PostPosted: Mon Nov 20, 2017 11:41 am    Post subject: Reply with quote

Palme wrote:
Hi xaviermiller
Unfortunately, i'm not allowed to pass on to third party :oops:

Your license is wrong then, or you don't understand lgpl ; as soon as you get any binary made from lgpl sources, you own the sources and can distribute them the way you wish (and as soon as you distribute yourself binaries of it, your "wish" is now change into "force" too).

While you may not disclose their url, you can gives anyone url to your sources, and while your stupid software distributor may cry and not enjoy it, every man that has contribute to the sources because they were GPL would enjoy that you respect their wish (they might have not contribute to it knowing the sources would remain secret).

And as they have gave you the sources, i think they know fully they are force to do that, but it never kill anyone to gave them with a shitty "for your eyes only".
Why do commercial companies always want to play bad with GPL and still, love to use GPL code they didn't create?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11434

PostPosted: Tue Nov 21, 2017 3:04 am    Post subject: Reply with quote

To give the proprietary vendor the benefit of the doubt, Palme may have copied an ebuild from a project that is LGPL and reused it as a basis for the ebuild shown above.

Palme: since you mention a license in the DOCS variable, could you pastebin that? I expect that sharing the text of the license is permitted, even if sharing the underlying software is not. As for your other problems with writing an ebuild, our ability to help you is limited if you cannot share the source, and is nearly non-existent if you also cannot share the error messages encountered from using your ebuild on the source.
Back to top
View user's profile Send private message
Palme
n00b
n00b


Joined: 31 May 2014
Posts: 51

PostPosted: Tue Nov 21, 2017 11:07 am    Post subject: Reply with quote

Hu wrote:
To give the proprietary vendor the benefit of the doubt, Palme may have copied an ebuild from a project that is LGPL and reused it as a basis for the ebuild shown above.


that's exactly how it was

Hu wrote:
Palme: since you mention a license in the DOCS variable, could you pastebin that?


sure :)
https://pastebin.com/ujpNQCuT

Hu wrote:
if you also cannot share the error messages encountered from using your ebuild on the source.


share the error messages encountered from using your ebuild will be no problem
Back to top
View user's profile Send private message
joanandk
n00b
n00b


Joined: 12 Feb 2017
Posts: 39

PostPosted: Tue Nov 21, 2017 1:31 pm    Post subject: Re: compile source without ebuild? Reply with quote

Palme wrote:
or can i compile the source in a conventional way?


Yes you can, there is no need for ebuild if you want it to be on your system.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11434

PostPosted: Wed Nov 22, 2017 12:28 am    Post subject: Reply with quote

That license file looks to me like a very permissive one, so you could freely share the source with us and still be in compliance with it. Is there some other contract that prohibits you from exercising the rights granted in that license?

While joanandk is technically correct that an ebuild is not required, I strongly discourage installing packages system-wide without the help of the package manager. If you install without the package manager, it becomes your responsibility to know where the files were installed and to remove them on any later upgrade or uninstall. If you install via the package manager, it handles that for you.

We will await the error messages from your attempt to use the ebuild.
Back to top
View user's profile Send private message
JackHunt
n00b
n00b


Joined: 21 Aug 2016
Posts: 25
Location: Oxfordshire, England

PostPosted: Fri Nov 24, 2017 8:04 am    Post subject: Re: compile source without ebuild? Reply with quote

bunder wrote:

The problem begins when people do stuff like "make install" or otherwise copying files onto the filesystem (like /bin /sbin /usr/bin /usr/sbin etc etc).


Yes, usually for third party software for which there is no ebuild, I install either to somewhere in my home directory or a subdirectory of /opt
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11434

PostPosted: Sun Nov 26, 2017 12:31 am    Post subject: Reply with quote

Personally, anything I expect to stay around for more than a few hours gets a wrapper ebuild, just so that Portage tracks its files, checks for library ABI breakage, and so on.
Back to top
View user's profile Send private message
Palme
n00b
n00b


Joined: 31 May 2014
Posts: 51

PostPosted: Thu Nov 30, 2017 2:32 pm    Post subject: Reply with quote

unfortunately the ebuild failed to compile

Code:
 * Package:     app-misc/lpfs-1.1.5
 * Repository: localrepo
 * USE:        abi_x86_64 amd64 elibc_glibc gnutls ipv6 kernel_linux nls ssl userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking lpfs-1.1.5.tar.bz2 to /var/tmp/portage/ app-misc/lpfs-1.1.5/work
>>> Source unpacked in /var/tmp/portage/ app-misc/lpfs-1.1.5/work
 * ERROR:  app-misc/lpfs-1.1.5::localrepo failed (prepare phase):
 *   The source directory '/var/tmp/portage/ app-misc/lpfs-1.1.5/work/lpfs-1.1.5' doesn't exist
 *
 * Call stack:
 *            ebuild.sh, line  776:  Called __ebuild_main 'prepare'
 *   phase-functions.sh, line 1053:  Called __dyn_prepare
 *   phase-functions.sh, line  372:  Called die
 * The specific snippet of code:
 *         die "The source directory '${S}' doesn't exist"
 *
 * If you need support, post the output of `emerge --info '= app-misc/lpfs-1.1.5::localrepo'`,
 * the complete build log and the output of `emerge -pqv '= app-misc/lpfs-1.1.5::localrepo'`.
 * The complete build log is located at '/var/tmp/portage/ app-misc/lpfs-1.1.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/ app-misc/lpfs-1.1.5/temp/environment'.
 * Working directory: '/var/tmp/portage/ app-misc/lpfs-1.1.5/homedir'
 * S: '/var/tmp/portage/ app-misc/lpfs-1.1.5/work/lpfs-1.1.5'


maybe someone has an idea
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7316
Location: ~Brussels - Belgique

PostPosted: Thu Nov 30, 2017 2:35 pm    Post subject: Reply with quote

is there a space in the ebuild?
or at least a space between = and the ebuild name
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9577
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Nov 30, 2017 2:47 pm    Post subject: Reply with quote

Hi Palme,

I suspect all ebuilds (not just yours) are failing, right? In any case, could you post your /etc/portage/make.conf file, please? It's likely you've messed up your PORTAGE_TMPDIR variable with a trailing space. This variable need not even exist unless your changing the default, which you don't appear to be doing.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Palme
n00b
n00b


Joined: 31 May 2014
Posts: 51

PostPosted: Thu Nov 30, 2017 3:06 pm    Post subject: Reply with quote

xaviermiller wrote:
is there a space in the ebuild?
or at least a space between = and the ebuild name


ebuild name is :
Code:
lpfs-1.1.5.ebuild


John R. Graham wrote:
Hi Palme,

I suspect all ebuilds (not just yours) are failing, right? In any case, could you post your /etc/portage/make.conf file, please? It's likely you've messed up your PORTAGE_TMPDIR variable with a trailing space. This variable need not even exist unless your changing the default, which you don't appear to be doing.

- John


Code:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE and USE_EXPAND flags that were used for
# buidling in addition to what is provided by the profile.
USE="mmx sse sse2 multilib dlz -X -gtk -sdl -qt -nptl -xpm -gpm ssl"
CPU_FLAGS_X86="mmx sse sse2"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
RSYNC_TIMEOUT=180
MAKEOPTS="-j3"
Back to top
View user's profile Send private message
Palme
n00b
n00b


Joined: 31 May 2014
Posts: 51

PostPosted: Wed Dec 06, 2017 10:21 am    Post subject: Reply with quote

Hi
i give up

now i use the program on a kvm with debian and and it works like a charm
thanks again to all of you for your help
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 4532

PostPosted: Wed Dec 06, 2017 4:09 pm    Post subject: Reply with quote

xaviermiller wrote:
is there a space in the ebuild?
or at least a space between = and the ebuild name

Probably a space in the category directory name from using a GUI file manager, and portage autocompleted the error given a bare package name.
_________________
*.ebuild // /etc/service/*
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