Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Some local + binhost builds bloated with full PORTAGE_TMPDIR
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Thu Feb 29, 2024 12:33 pm    Post subject: Some local + binhost builds bloated with full PORTAGE_TMPDIR Reply with quote

As an example in terminal:
Code:
ALSA lib /var/no-tmpfs/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/pcm/pcm.c:8684:(snd_pcm_recover) underrun occurred
$PORTAGE_TMPDIR seems stored in binary.
If so, what am I doing wrong?
Is there a way to lower this fingerprint?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Mon Mar 04, 2024 8:28 am; edited 5 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Thu Feb 29, 2024 4:11 pm    Post subject: Reply with quote

Some build systems invoke the compiler with the absolute path of the source file. This causes __FILE__ to be that absolute path. If you want to stop this, patch the build system to use a relative path to the source file.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Thu Feb 29, 2024 4:51 pm    Post subject: Reply with quote

Hum,
Code:
[EDIT]equery f alsa-lib | while read line;do if [ -f $line ]; then grep -a portage $line;fi;done
doesn't return anything.
If that command line is correct, it sounds like $PORTAGE_TMPDIR path value isn't stored as clear text...

In any case this is a very uncomfortable situation imo.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Thu Feb 29, 2024 5:54 pm; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Thu Feb 29, 2024 5:04 pm    Post subject: Reply with quote

Why is this uncomfortable?

That command seems incorrect, as it does not allow grep to print from binary files.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Thu Feb 29, 2024 5:31 pm    Post subject: Reply with quote

Hu wrote:
Why is this uncomfortable?
I don't like bloat, as well as chasing it away: 37 references * 77 characters.
Hu wrote:
That command seems incorrect, as it does not allow grep to print from binary files.
Thks 4 ur attention not providing the 2 char long "-a" missing bit, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Thu Feb 29, 2024 6:17 pm    Post subject: Reply with quote

37 instances of 77 characters comes out to 2849 bytes extra. Depending on filesystem block size, there is a good chance that you would get zero savings from removing the extra bytes.

As for not providing -a, you only remarked on whether the command was correct. I noted it was not. You found or remembered the correct option with a bit of prompting, so I think my comment was sufficient.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Thu Feb 29, 2024 7:14 pm    Post subject: Reply with quote

Hu wrote:
37 instances of 77 characters comes out to 2849 bytes extra. Depending on filesystem block size, there is a good chance that you would get zero savings from removing the extra bytes.


Compaq laptop here:
PATA i.e. 512 bytes block,

1024 Mb RAM here. Thus no-tmpfs in $PORTAGE_TMPDIR.
Plz don't bloat my RAM.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Thu Feb 29, 2024 8:18 pm    Post subject: Reply with quote

Hard disk block size is irrelevant if your filesystem uses a larger block size. Did you configure ext4 (or equivalent) to use a small enough block size? One of my filesystems here picked a 4096 byte logical block size, so any non-empty file on that filesystem must occupy at least 4096 bytes.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Thu Feb 29, 2024 9:02 pm    Post subject: Reply with quote

I've checked that PATA, where ext4 is indeed configured to use 4Kb block instead of 512b as I wrongly thought.
That mistake brings a new maintenance task to be planned.

A few packages here are flooded with PORTAGE_TMPDIR references.

280 libgromacs.so
246 libportaudio.so
194 libz3.so
98 libgnutls.so
85 liblldb.so

enough for an at least one superfluous 4K file system block allocation.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Thu Feb 29, 2024 10:37 pm    Post subject: Reply with quote

How many superfluous filesystem block allocations are required to store this thread? ;)

Remember that filesystem blocks cannot be shared across files, so each package needs to have each of its files accounted individually.
Back to top
View user's profile Send private message
Ninpo
n00b
n00b


Joined: 30 Aug 2004
Posts: 37

PostPosted: Fri Mar 01, 2024 1:00 am    Post subject: Reply with quote

CaptainBlood wrote:
I've checked that PATA, where ext4 is indeed configured to use 4Kb block instead of 512b as I wrongly thought.
That mistake brings a new maintenance task to be planned.

A few packages here are flooded with PORTAGE_TMPDIR references.

280 libgromacs.so
246 libportaudio.so
194 libz3.so
98 libgnutls.so
85 liblldb.so

enough for an at least one superfluous 4K file system block allocation.

Thks 4 ur attention, interest & support.


This is how (some) compilers work. Why are you like this?
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Fri Mar 01, 2024 6:23 am    Post subject: Reply with quote

Ninpo wrote:
This is how (some) compilers work?
Long time, no see.
Glad to see you back.

I've checked with alsa-libs binary from one other distro.
It doesn't contain such a build path.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Ninpo
n00b
n00b


Joined: 30 Aug 2004
Posts: 37

PostPosted: Sat Mar 02, 2024 3:10 pm    Post subject: Reply with quote

CaptainBlood wrote:
Ninpo wrote:
This is how (some) compilers work?
Long time, no see.
Glad to see you back.

I've checked with alsa-libs binary from one other distro.
It doesn't contain such a build path.

Thks 4 ur attention, interest & support.


Non Gentoo distro binaries don't contain the Gentoo build path? Word?

They'll contain whatever path their own build system used.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Sat Mar 02, 2024 9:58 pm    Post subject: Reply with quote

Guru meditation time:
Arch binary;
Code:
user@amd64 ~ $ grep -a -c "/pcm.c" alsa-lib/arch/lib/libasound.so 2[EDIT]
0 [EDIT]
user@amd64 ~ $
Gentoo binary
Code:
user@amd64 ~ $ grep -a -c "/pcm.c" alsa-lib/gentoo/lib64/libasound.so 2
2
user@amd64

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Mon Mar 04, 2024 9:51 am; edited 3 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Sun Mar 03, 2024 12:50 am    Post subject: Reply with quote

That looks wrong. Shouldn't Arch have printed 0 if there were no matches? Why are you redirecting stderr to /dev/null?
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Sun Mar 03, 2024 10:40 pm    Post subject: Reply with quote

Indeed, checked and edited above.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Ninpo
n00b
n00b


Joined: 30 Aug 2004
Posts: 37

PostPosted: Mon Mar 04, 2024 12:44 am    Post subject: Reply with quote

Hu wrote:
That looks wrong. Shouldn't Arch have printed 0 if there were no matches? Why are you redirecting stderr to /dev/null?


Please send this thread to /dev/null
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Mon Mar 04, 2024 8:13 am    Post subject: Reply with quote

Were doppelgangers are.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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