Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

build from source error, package depends on itself

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

build from source error, package depends on itself

#1 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#2 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#3 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#4 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#5 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#6 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#7 Post by MagicPoulp »

I will try again an build gcc-9 from source first

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#8 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#9 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#10 Post by MagicPoulp »

strangely, the doc says I msut install first the package before building it:
https://wiki.debian.org/BuildingTutorial

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#11 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#12 Post by MagicPoulp »

I think what I need is to build the dependency myself from the list of dependencies fetched with apt-rdepends

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#13 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#14 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#15 Post by MagicPoulp »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: build from source error, package depends on itself

#16 Post by Head_on_a_Stick »

MagicPoulp wrote:

Code: Select all

The following packages have unmet dependencies:
[b] builddeps:openjdk-8-jdk : Depends: openjdk-8-jdk but it is not installable or[/b]
                                    openjdk-7-jdk but it is not installable
E: Unable to correct problems, you have held broken packages.
I've just tried that and my error is different, g++-9 is the missing package for me.
MagicPoulp wrote:I create a chroot with debootstrap, I added unstable to the sources.list
Why not just create a sid chroot in the first place? Or stretch, that openjdk version is also available there.

And please learn how to use the "edit" button, this thread is a ****** mess... :roll:
deadbang

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#17 Post by MagicPoulp »

Thanks for the help

Actually the g++ depends on the debian version it is dynamic.

It seally seems if there was not this cicruclar dependency t oitself, the package can be built wit hstasble packages mainly

I need a way to run build-dep manually wit hrdepends, still trying

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: build from source error, package depends on itself

#18 Post by stevepusser »

What target release are you building for, Buster? You can't add all kinds of testing and unstable packages to the build environment and expect it to build a Buster-compatible package. Plus there are some tweaks you need to perform to get a successful Buster build.

If you just want openjdk-8 in Buster, I would suggest the wtf repo:

https://www.mirbsd.org/~tg/Debs/debidx.htm

https://www.mirbsd.org/~tg/Debs/dists/b ... openjdk-8/

I've used their binaries to rebuild their source for the Buster MX 19 repo, though I used sbuild to use a vanilla Buster schroot instead of directly in a chroot as you seem to. Pbuilder doesn't work for some reason.

I had the downloaded debs in a directory that I told sbuild to use as a local repo, but you can also add the wtf repo to the sbuild command to get the packages. You can use [trusted=yes] to skip all that jazz about adding the repo key to sbuild.
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: build from source error, package depends on itself

#19 Post by Head_on_a_Stick »

@OP: please stop opening new threads to solve your single problem, you now have *four* threads open all asking for terrible "solutions" to a single problem.

Read this: https://en.wikipedia.org/wiki/XY_problem

And in future please restrict yourself to a single thread per problem and describe in full exactly what the overall aim is rather than asking for specific solutions for your misinformed understanding of what should be done.
deadbang

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: build from source error, package depends on itself

#20 Post by MagicPoulp »

ok sorry. but only 3 threads were opened. THe locale thing was very specific.

Post Reply