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

 

 

 

how to run builddep- manually due to circular dep

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

how to run builddep- manually due to circular dep

#1 Post by MagicPoulp »

how to build this package in sid called openjdk-8-jdk so that it is installable on stable?

it has a dependency to itself.

SO I need to install build-dep manually with rdepends, how can I do it?

I am in a stable chroot

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: how to run builddep- manually due to circular dep

#2 Post by cuckooflew »

Why don't you try what was suggested here? : http://forums.debian.net/viewtopic.php? ... 63#p722363

Also there are some other valid methods in the search results, using keywwords:

Code: Select all

How to build openjdk-8-jdk for Debian 10 
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

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

Re: how to run builddep- manually due to circular dep

#3 Post by MagicPoulp »

Thanks for the help. I made a new thread that is more specific.

People proposed alternatives (MIRBSD, run my app in a chroot), but I want to learn and I think my package is buildable on stable, because no dependency is absolutely outside of stable. The dependency to the package itself will block build-dep, but I can install the packages manually.

The reason I cannot install on sid in a chroot is because I cannot install the flutter android license in a chroot and then copy the folders outside of it, the license will break.

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

Re: how to run builddep- manually due to circular dep

#4 Post by MagicPoulp »

I already built one openjdk-8 a few months ago but it only works if I temporarily change libc6 version. It is not Frankendebian if i revert after use. Maybe a shell temprorary change of LD_LBIRARY_PATH would work too.

Or maybe I am wrong. stable has g++ 8 while the package seems to depend on g++9.
But in the rules file the g++ version is said to be 8 if I run buster.
So this dependency to g++-9 seems artificial.
yes apt-rdpends requires g++-9, but here is the rules file, and it seems I could build with stable packages.

debian/rules
else ifneq (,$(filter $(distrel),buster))
export CC = $(DEB_HOST_GNU_TYPE)-gcc-8
export CXX = $(DEB_HOST_GNU_TYPE)-g++-8
else
export CC = $(DEB_HOST_GNU_TYPE)-gcc-9
export CXX = $(DEB_HOST_GNU_TYPE)-g++-9
endif

This is what I will do:
clone the bzr repo on launchpad
get an older version jsut before the buster release.
lsit the buster dependencies and isntall then
then build the latest source on usntable using the stable build-dep
If I find that it is really locked to usntable, then I will build the old version.

Perhaps I will suggest changes to the package admins. But not before I am sure.
Any opinion if the circular dependency to the package itself should be corrected?
Maybe I will make a backports if it can be useful to others.

---
update: I "checked out" a version needing GCC 8 and not 9 since buster has GCC 8.
I could install all dependencies and that are all available in buster, until the circular dependency remained. Then I learnt that building Java 8 requires a boot JDK, which means java 8 or 7 already isntalled.

So now I will try to find a prebuilt Java 8 (mirbsd?) to use as a boot JDK, and as a debian dependency for the debuild command. Then I will build with 100% compatibility on buster stable. So far I have run for 5 minutes the debuild without errors.
ANd the link below gives the latest build even if a commit was don 1 month ago, it builds the latest, it is actualized.
from stevepusser:
https://www.mirbsd.org/~tg/Debs/dists/b ... openjdk-8/

I do not understand how they can they call their version
Version: 8u252-b09-1~wtf10+1
and only depend on libc6 >= 2.2.5

that revision 8u252-b09-1 requires g++9 to be built.

UPDATE:
With the latest revision, changing g++-9 to 8 in the control file, and then it will build fine.

To people saying I waste your time, I am confused etc... you must realize that building from source is more secure than just installing from mirbsd a package.
That is the whole point of open source, one can check the source and build it.

OK I am not totally independent of an external package. But it still makes a difference.
Last edited by MagicPoulp on 2020-06-16 15:11, edited 6 times in total.

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

Re: how to run builddep- manually due to circular dep

#5 Post by MagicPoulp »

other question,
how do I unmount proc and sys and dev? It says "busy".
To delete the chroot, I need to unmount first.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: how to run builddep- manually due to circular dep

#6 Post by cuckooflew »

how do I unmount proc and sys and dev? It says "busy"
If none of the results work, then maybe with examples of what you tried ,etc.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

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

Re: how to run builddep- manually due to circular dep

#7 Post by MagicPoulp »

edited above with the final solution.

Does anyone think it can be useful if I publish a formal backports?

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

Re: how to run builddep- manually due to circular dep

#8 Post by Head_on_a_Stick »

MagicPoulp wrote:you must realize that building from source is more secure than just installing from mirbsd a package
No, it isn't. The person in charge of MirBSD is a Debian developer...

https://wiki.debian.org/ThorstenGlaser
deadbang

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

Re: how to run builddep- manually due to circular dep

#9 Post by MagicPoulp »

ANd what if the NSA corrupts him to put in corrupted malware?

Still building from source can only be better.
I will compare the binary sizes. THey probably will match.

By the way, the debuild command reports about missing dependencies so I could install those to enventually get an error explaining the JAVA Boot thing.

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

Re: how to run builddep- manually due to circular dep

#10 Post by Head_on_a_Stick »

MagicPoulp wrote:ANd what if the NSA corrupts him to put in corrupted malware?
Perhaps buy some tin foil and make a nice hat with which to protect yourself? :mrgreen:

But seriously, the wtf repositories include the sources so if you're that paranoid you could grab those instead and build them locally after examining the code line-by-line.
deadbang

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

Re: how to run builddep- manually due to circular dep

#11 Post by MagicPoulp »

and for the other question this is what I get while all terminals except one are closed:

How can I unmount?

thierry@debian-thierry:/stable-chroot$ sudo umount sys
umount: /stable-chroot/sys: target is busy.


It is still mounted after I reboot using sudo reboot.

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

Re: how to run builddep- manually due to circular dep

#12 Post by stevepusser »

MagicPoulp wrote:ANd what if the NSA corrupts him to put in corrupted malware?

Still building from source can only be better.
I will compare the binary sizes. THey probably will match.

By the way, the debuild command reports about missing dependencies so I could install those to enventually get an error explaining the JAVA Boot thing.
What if the NSA corrupts any other Debian developer to add spyware to the Debian repositories? What if reptilian aliens replace all the developers with evil replicants?

You said you already built an older version of openjdk-8?
Did you build packages, or something else, or does it need a FrankenDebian?
If you built good packages, why not use those as the build-dependencies?

I already said it once. You can use the mirbsd packages to recompile their source packages on Buster. Not Sid's source packages, because that debian folder's files aren't tweaked to build correctly on Buster like mirbsd's. You don't need any newer libc6 from Sid, nothing like that.

I already pointed out that I did the same thing already for MX Linux, several times in fact to keep up with the updates. I suggest you install sbuild from buster-backports and learn how to use it to build packages in schroots. Install ubuntu-dev-tools (which are in Debian repos) to get some scripts to easily create an sbuild schroot, such as

Code: Select all

mk-sbuild buster
to create one for Buster and your current architecture. Check out the Debian and Ubuntu wikis, plus the man page for sbuild.
MX Linux packager and developer

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

Re: how to run builddep- manually due to circular dep

#13 Post by MagicPoulp »

Thanks for suggestions.

I start simple with the debian doc for build, there is a main website edbian build.

I ran debuild -b -us -uc like the debian doc website suggests.
But the CPu usage is only of 67,2%

and this is for one core, if I run shift + i it shows the overall percentage which is lower, just 5%.

Q1: Is there a way to parallelize builds?
If you run make there is an option -j8 to run on several cores.

edit: actually tests are being run not the build so that may be why. It is probably prallelized automatically.

Q2. ANd is there a way to skip the tests at the end?
the .deb files still dont show up.

I found the answer in the debian/rules file
there is an install make target

install: packaging-files
dh_testdir
dh_testroot
dh_prep || dh_clean -k
rm -f debian/*.install debian/*.links
dh_installdirs
Last edited by MagicPoulp on 2020-06-17 07:29, edited 3 times in total.

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

Re: how to run builddep- manually due to circular dep

#14 Post by MagicPoulp »

You said you already built an older version of openjdk-8?
Did you build packages, or something else, or does it need a FrankenDebian?
If you built good packages, why not use those as the build-dependencies?
It required a Frankenstein libc6 from unstable.

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

Re: how to run builddep- manually due to circular dep

#15 Post by MagicPoulp »

files have few bytes of difference, exept one file which has a huge difference:
openjdk-8-jdk_8u252-b09-1_amd64.deb
1905916
381580 for WTF

I only built the binary using debuild -us -uc -b

root@debian-thierry:/downloads/source# ls -l *.deb | grep -vE "dbg|zero|demo|source|doc"
-rw-r--r-- 1 root root 1905916 Jun 17 09:44 openjdk-8-jdk_8u252-b09-1_amd64.deb
-rw-r--r-- 1 root root 8268140 Jun 17 09:45 openjdk-8-jdk-headless_8u252-b09-1_amd64.deb
-rw-r--r-- 1 root root 69652 Jun 17 09:44 openjdk-8-jre_8u252-b09-1_amd64.deb
-rw-r--r-- 1 root root 27350968 Jun 17 09:45 openjdk-8-jre-headless_8u252-b09-1_amd64.deb
root@debian-thierry:/downloads/source# ls -l ../mirbsd/*.deb
-rw-r--r-- 1 root root 381580 Apr 21 19:12 ../mirbsd/openjdk-8-jdk_8u252-b09-1~wtf10+1_amd64.deb
-rw-r--r-- 1 root root 8272928 Apr 21 19:13 ../mirbsd/openjdk-8-jdk-headless_8u252-b09-1~wtf10+1_amd64.deb
-rw-r--r-- 1 root root 69572 Apr 21 19:12 ../mirbsd/openjdk-8-jre_8u252-b09-1~wtf10+1_amd64.deb
-rw-r--r-- 1 root root 27359972 Apr 21 19:14 ../mirbsd/openjdk-8-jre-headless_8u252-b09-1~wtf10+1_amd64.deb


My build dworked.
But using java 8 requires 500 MB of extra packages, but present in buster:

openssl ca-certificates libnspr4 libsqlite3-0 libnss3 ca-certificates-java java-common libavahi-common-data libavahi-common3 libdbus-1-3 libavahi-client3 libkeyutils1 libkrb5support0 libk5crypto3 libkrb5-3 libgssapi-krb5-2 libcups2 liblcms2-2 libjpeg62-turbo libexpat1 libpng16-16 libfreetype6 ucf fonts-dejavu-core fontconfig-config libfontconfig1 libpcsclite1 libxau6 libxdmcp6 libxcb1 libx11-data libx11-6 libxext6 libxi6 libxrender1 x11-common libxtst6 dbus krb5-locales libglib2.0-0 libxrandr2 libxinerama1 libglvnd0 libdrm-common libdrm2 libglapi-mesa libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxfixes3 libxdamage1 libxshmfence1 libxxf86vm1 libdrm-amdgpu1 libpciaccess0 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libedit2 libllvm7 libsensors-config libsensors5 libgl1-mesa-dri libglx-mesa0 libglx0 libgl1 libgl1-mesa-glx libgtk2.0-common libatk1.0-data libatk1.0-0 libpixman-1-0 libxcb-render0 libxcb-shm0 libcairo2 libjbig0 libwebp6 libtiff5 libicu63 libxml2 shared-mime-info libgdk-pixbuf2.0-common libgdk-pixbuf2.0-0 fontconfig libfribidi0 libthai-data libdatrie1 libthai0 libpango-1.0-0 libgraphite2-3 libharfbuzz0b libpangoft2-1.0-0 libpangocairo-1.0-0 libxcomposite1 libxcursor1 hicolor-icon-theme gtk-update-icon-cache libcroco3 librsvg2-2 librsvg2-common adwaita-icon-theme libgtk2.0-0 libatspi2.0-0 libatk-bridge2.0-0 libcairo-gobject2 libcolord2 libepoxy0 libjson-glib-1.0-common libjson-glib-1.0-0 libpsl5 libproxy1v5 glib-networking-common glib-networking-services libdconf1 libpam-systemd dbus-user-session dconf-service dconf-gsettings-backend gsettings-desktop-schemas glib-networking libsoup2.4-1 libsoup-gnome2.4-1 librest-0.7-0 libwayland-client0 libwayland-cursor0 libwayland-egl1 xkb-data libxkbcommon0 libgtk-3-common libgtk-3-0 libfontenc1 libice6 libsm6 libxt6 libxmu6 libxpm4 libxaw7 libxcb-shape0 libxft2 libxmuu1 libxv1 libxxf86dga1 x11-utils libatk-wrapper-java libatk-wrapper-java-jni libasound2-data libasound2 libgif7 libasyncns0 libogg0 libflac8 libvorbis0a libvorbisenc2 libsndfile1 libwrap0 libpulse0 at-spi2-core libgail18 libgail-common libgdk-pixbuf2.0-bin libglib2.0-data libgtk-3-bin libgtk2.0-bin publicsuffix xdg-user-dirs

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: how to run builddep- manually due to circular dep

#16 Post by cuckooflew »

You really should consider using code boxes for these kind of posts.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

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

Re: how to run builddep- manually due to circular dep

#17 Post by stevepusser »

I'm pretty sure that when I build openjdk-8 using sbuild, it tries by default to use all my cores. Generally, I don't want to use all twelve threads on my laptop and squeeze me off to the side, so I try to pass the upper case "-J10" or something like that to the build command, which is a stronger command to limit it to ten threads.

For sbuild, the command is something like this:

Code: Select all

sbuild  --arch=amd64 -d buster --debbuildopt=-J10 --force-orig-source -s -A \
--extra-repository="deb [trusted=yes] http://www.mirbsd.org/~tg/Debs/ buster wtf" \
--extra-repository="<some other repo you might want to tack onto Buster for the build>"
Note that I added the wtf repo there so you can get their openjdk-8 packages for your reinvention of the wheel.
That's all one command--I use backslashes to organize it better in my cheat sheets.

Mirbsd is using the same exact orig source tarball as Debian is, the only difference being in the debian folder's instructions on how to build the dang thing.
MX Linux packager and developer

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

Re: how to run builddep- manually due to circular dep

#18 Post by MagicPoulp »

I was wrong I did not monitor properly that debuild was not running on all cores. The build tests at the end made it low slow.

I still don't know why the binary sizes differ so much. Probably due to build flags.

If I really wanted security, I probably would use the proprietary Oracle Java 8. I don't have the time to check how safe is this openjdk source, etc.
If I wanted security, I would make sure Java is skipped totally but I couldn't.

I probably would use linux form scratch to really check what I am running. ANd I would rely on how much "peer reviewed" is the stuff I install. And this openjdk8 would not pass the check.

But I moved on. I can now focus on "my life" like Torvalds likes to say. And my programming life consists now in computing a Fast fourrier transform on a mobile device recording sound, to ultimately analyze the justness of my music instrument.

The algorithms around LPCM are fantastic. The actual physical process of sound is transformed into a voltage signal, which is then digitalized at super with high sample rate (the frequency of sampling is higher than the earable modes frequencies). A wave file is so simple.

Post Reply