build from source error, package depends on itself

If none of the more specific forums is the right place to ask

build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 07:49

I am trying to build a package using the debian doc:
https://wiki.debian.org/BuildingTutorial

Here is my error:
"
apt-get build-dep openjdk-8-jdk
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
builddeps:openjdk-8-jdk : Depends: openjdk-8-jdk but it is not installable or
openjdk-7-jdk but it is not installable
E: Unable to correct problems, you have held broken packages.

"


I create a chroot with debootstrap, I added unstable to the sources.list
Then I fetched the source
See below there is no error
"
root@debian-1:/downloads# apt source openjdk-8-jdk
Reading package lists... Done
NOTICE: 'openjdk-8-jdk' packaging is maintained in the 'Bzr' version control system at:
http://bazaar.launchpad.net/~openjdk/openjdk/openjdk8
Please use:
bzr branch http://bazaar.launchpad.net/~openjdk/openjdk/openjdk8
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 71.9 MB of source archives.
Get:1 http://ftp.se.debian.org/debian unstable/main openjdk-8 8u252-b09-1 (dsc) [4675 B]
Get:3 http://ftp.se.debian.org/debian unstable/main openjdk-8 8u252-b09-1 (diff) [245 kB]
Get:2 http://gensho.ftp.acc.umu.se/debian unstable/main openjdk-8 8u252-b09-1 (tar) [71.7 MB]
Fetched 71.9 MB in 1s (92.5 MB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "sv_SE.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
dpkg-source: info: extracting openjdk-8 in openjdk-8-8u252-b09
dpkg-source: info: unpacking openjdk-8_8u252-b09.orig.tar.xz
dpkg-source: info: unpacking openjdk-8_8u252-b09-1.debian.tar.xz

"

    1 cat /etc/apt/sources.list
    2 nano /etc/apt/sources.list
    3 cd /etc/apt/preferences.d/
    4 ll
    5 ls
    6 nano preferences
    7 apt update
    8 cd
    9 mkdri downloads
    10 mkdir downloads
    11 cd downloads/
    12 c
    13 clear
    14 apt source openjdk-8-jdk
    15 ls /var/
    16 cd --
    17 chmod -R 777 downloads/
    18 cd downloads/
    19 ll
    20 ls
    21 rm * -rf
    22 clear
    23 apt source openjdk-8-jdk
    24 sudo apt-get install dpkg-dev
    25 apt-get install dpkg-dev
    26 sudo apt autoremove
    27 apt autoremove
    28 clear
    29 apt-get install dpkg-dev
    30 apt source openjdk-8-jdk
    31 ls
    32 rm * -rf
    33 clear
    34 apt source openjdk-8-jdk
    35 apt source openjdk-8-jdk
    36 apt update
    37 clear
    38 apt get dist-upgrade
    39 apt-get dist-upgrade
    40 apt update
    41 clear
    42 apt-get dist-upgrade
    43 clear
    44 apt source openjdk-8-jdk
    45 ls
    46 rm -rf openjdk-8_8u252-b09*
    47 ls
    48 pwd
    49 ll
    50 ls
    51 ls -ahgl
    52 ls
    53 mkdir downloads
    54 cd downloads/
    55 ll
    56 ls
    57 cd ..
    58 chmod -R 777 downloads/
    59 cd downloads/
    60 clear
    61 apt source openjdk-8-jdk
    62 which dpkg-source
    63 dpkg-source
    64 apt-get install dpkg-dev
    65 clear
    66 ls
    67 rm * -rf
    68 clear
    69 apt-get install dpkg-dev
    70 clear
    71 apt source openjdk-8-jdk
    72 sudo apt-get install build-essential fakeroot devscripts
    73 apt-get install build-essential fakeroot devscripts
    74 ls
    75 cd openjdk-8
    76 cd openjdk-8-8u252-b09/
    77 ls
    78 apt-get build-dep openjdk-8-jdk
    79 apt-get install -t unstable g++-9
    80 clear
    81 apt-get build-dep openjdk-8-jdk
    82 ls
    83 cd ..
    84 rm -rf openjdk-8*
    85 clear
    86 apt source openjdk-8-jdk
    87 ll
    88 ls -l
    89 cd openjdk-8-8u252-b09
    90 clear
    91 ls
    92 ls debian/
    93 clear
    94 ls
    95 apt-get build-dep openjdk-8-jdk
    96 ll
    97 ls
    98 grep -r openjdk-8-jdk
    99 clear
    100 apt-get build-dep openjdk-8-jdk
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 08:09

the files debian/rules
contains a dependency to a package of the same name as the one I am trying to install

# build dependencies
ifneq (,$(filter $(distrel),lucid precise))
bd_autotools = autoconf2.69, automake, autotools-dev,
export AUTOCONF=autoconf2.69
else
bd_autotools = autoconf (>= 2.69), automake, autotools-dev,
endif
bd_bootstrap += \
openjdk-8-jdk | openjdk-7-jdk,
ifeq (,$(filter $(distrel),squeeze wheezy jessie precise trusty))
bd_cross += \
openjdk-8-jdk-headless <cross>, dpkg-dev (>= 1.17.14),
endif
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 08:12

should I edit the rules file? there must be something else. Please help me understand this rules file.

The rules file has not changed so... I still need to understand why the package depends on itself.
Last edited by MagicPoulp on 2020-06-15 10:00, edited 1 time in total.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 09:52

here is where the package is maintained:
http://bazaar.launchpad.net/~openjdk/op ... k8/changes

A few months ago, I could build the version tagged 8u242-b04-1

Now it seems the latest updates make things not work for the latest version.

SO it seems there is nothing wrong in the commmands I run. The package may be corrupt but I have yet to find where.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 10:39

I sould check out an older version tag using the Bazaar repository.

But build-dep does not work on a local branch.

How can I run build-dep for a package located in a specific folder on the drive?
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 10:43

first it copmlained that g++-9 was missing. I installed it directly from unstable. Maybe that was wrong?

78 apt-get build-dep openjdk-8-jdk
79 apt-get install -t unstable g++-9
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 10:51

I will try again an build gcc-9 from source first
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 11:09

I created a new chroot.
reconfigured the locales
and now I get this error:

Code: Select all
apt build-dep openjdk-8-jdk
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 builddeps:openjdk-8-jdk : Depends: g++-9 but it is not installable
                           Depends: openjdk-8-jdk but it is not installable or
                                    openjdk-7-jdk but it is not installable
E: Unable to correct problems, you have held broken packages.




This is how I created the chroot.

3642 [2020-06-15 13:40:04] sudo mkdir /stable-chroot
3643 [2020-06-15 13:40:13] sudo debootstrap stable /stable-chroot http://deb.debian.org/debian/
3653 [2020-06-15 13:41:30] cd /stable-chroot/
3654 [2020-06-15 13:41:30] sudo mount -t proc proc proc/
3655 [2020-06-15 13:41:30] sudo mount --rbind /sys sys/
3656 [2020-06-15 13:41:31] sudo mount --rbind /dev dev/
sudo chroot /stable-chroot/ /bin/bash

then dpkg-reconfigure locales which worked well

Here are my sources.list and preferences:

deb http://deb.debian.org/debian stable main
deb-src http://deb.debian.org/debian stable main

# stretch-backports, pinned 100 by default so that it does not install by default
deb http://ftp.debian.org/debian stretch-backports main contrib non-free


# Testing repository - main, contrib and non-free branches
deb http://ftp.se.debian.org/debian testing main contrib non-free
deb-src http://ftp.se.debian.org/debian testing main contrib non-free


# Testing security updates repository
deb http://security.debian.org/ testing-security main contrib non-free
deb-src http://security.debian.org/ testing-security main contrib non-free


# Unstable repo main, contrib and non-free branches, no security updates here
deb http://ftp.se.debian.org/debian unstable main non-free contrib
deb-src http://ftp.se.debian.org/debian unstable main non-free contrib


preferences;

#backports are pinnined at 100 by default
# if this is not negative, a dist-upgrade can move too many packages to the backports versions
Package: *
Pin: release a=stretch-backports
Pin-Priority: -4

Package: *
Pin: release a=testing
Pin-Priority: -5

Package: *
Pin: release a=unstable
Pin-Priority: -10
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 12:45

Maybe a few months ago it worked because I have run build-dep -t unstable, which is wrong.

I still cant understand why the package depends on itself.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 13:03

strangely, the doc says I msut install first the package before building it:
https://wiki.debian.org/BuildingTutorial
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 13:10

using -t unstable does go through the previous error.
But in my opinion the package is corrupt and depends on itself. I should use the build dependencies on the stable branch as much as possible.


apt-get build-dep openjdk-8-jdk -t unstable
Reading package lists... Done
Picking 'openjdk-8' as source package instead of 'openjdk-8-jdk'
Selected version '8u252-b09-1' (unstable) for openjdk-8
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 13:10

I think what I need is to build the dependency myself from the list of dependencies fetched with apt-rdepends
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 13:23

The build dependencies do not seem availabe in stable.

apt-get install -t unstable gcc-8-base libmpx2
and now build-dep -t unstable
works


But the main reason I want to build again is because the old version I have built depends on a too new version of libc6 that was injected by packages from unstable.

So I need a smarter way to build without -t unstable.
It seems I need to build from source each and every dependency... hopefully only a few
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 13:28

Here maybe I can see the ones in stable and the ones in unstable only

apt-rdepends --build-depends --print-state openjdk-8-jdk | grep NotInstalled | cut -d " " -f 4 > temp
cat temp | xargs apt-get install
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

Postby MagicPoulp » 2020-06-15 13:37

apt-rdepends g++-10
shows Depends: libc6 (= 2.30-8)

This means what I do is not possible. I cannot build this package and make it directly available on debian stable. Because debian stable has libc6 (2.28-10).

So what I need is to make libc6 change temporarily when I use the package, and then put back the default libc6 afterwards.

I will ask a new question for this.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 20 guests

fashionable