On Thu, May 07, 2020 at 10:50:25AM +0530, Groot wrote: > I tried installing rust through ports, but couldn't > > ===> Configuring for rust-1.42.0 > Using /usr/portsdir/pobj/rust-1.42.0/config.site (generated) > datasize limit is too low - amd64 build takes approx 4GB > *** Error 1 in /usr/ports/lang/rust (Makefile:152 'pre-configure': @if [ > `ulimit -d` -lt 3145728 ]; then echo datasize limit is too low - a...) > > I should mention that I tried setting `ulimit -d unlimited` as > root user, but seems that it's doesn't affect the defaults of normal > user much. Since I set PORTS_PRIVSEP in `mk.conf`, _pbuild in my opinion > is the user we are talking about. > > After setting `ulimit -d unlimited` as root, the unprivileged user > gets a hard limit of 786433. As root user of course there is more than > enough memory. So is there a way out? >
ulimit is a per user setting. I am unsure how you are doing "setting `ulimit -d unlimited` as root" to affect users (as it would only affect the current session of root). if you are using -current (what I assume as there is no mention) and PORTS_PRIVSEP, the build user should have ~7Go of datasize, which should be enough to pass the pre-configure test. you could check you settings with: - check PORTS_PRIVSEP configuration: $ cd /usr/ports/lang/rust && make show=PORTS_PRIVSEP Yes $ cd /usr/ports/lang/rust && make show=BUILD_USER _pbuild - obtain the class of the user _pbuild $ id -c _pbuild pbuild - obtain the soft datasize limit for the class pbuild $ getcap -s datasize-cur -f /etc/login.conf pbuild 7168M (or read /etc/login.conf file) To change the limit, you should edit the right class in /etc/login.conf, and change `datasize-cur' setting for this class. Thanks. -- Sebastien Marie