Bug 253766 - databases/pgloader3: builds on i386 now (and other non-64)
Summary: databases/pgloader3: builds on i386 now (and other non-64)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: Christoph Moench-Tegeder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-22 15:45 UTC by Mario Duhanic
Modified: 2021-02-24 21:46 UTC (History)
2 users (show)

See Also:


Attachments
diff -u files/patch-Makefile (1.94 KB, patch)
2021-02-22 15:45 UTC, Mario Duhanic
no flags Details | Diff
proposed patch for patch-Makefile, diff -u ports files/patch-Makefile.diff (1.87 KB, patch)
2021-02-24 00:59 UTC, Mario Duhanic
freebsd-ravioli: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Duhanic 2021-02-22 15:45:46 UTC
Created attachment 222726 [details]
diff -u files/patch-Makefile

changed dynamic-space-size from 4 GiB to 1 GiB for all non-64 versions, poudriere testport ran without problems on both amd64 and i386, s.a. bug #252716

affects: files/patch-Makefile

PORTREVISION: not raised, as this port version never was built (on i386), s. Porter's Handbook 4.3.1

thanks!
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2021-02-22 15:45:46 UTC
Maintainer informed via mail
Comment 2 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2021-02-23 19:21:09 UTC
This seems to be working in gerneral.
But instead of trying to pattern-match on the machine architecture name, wouldn't it be more correct (and perhaps more robust - e.g. when new architecture names are invented) to use getconf to test for pointer size? I think "POSIX_V6_LPBIG_OFFBIG" ("at least 64 bit pointer") would be the thing to test for?
Comment 3 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2021-02-23 19:26:48 UTC
(In reply to Christoph Moench-Tegeder from comment #2)
ah, we only have POSIX_V6_LP64_OFF64, not the "BIG" variant
Comment 4 Mario Duhanic 2021-02-24 00:59:51 UTC
Created attachment 222777 [details]
proposed patch for patch-Makefile, diff -u ports files/patch-Makefile.diff

Thanks for the comments!

I was thinking about truncating "sysctl -n hw.usermem" somehow (to avoid an overflow) and checking if we are able to allocate 1 or 4 GiB or so to come back to the initial problem "can I haz memory". But this didn't seem to look quite elegant.

Now I'm using "getconf LONG_BIT" to compare against, which should cover hopefully all or most of the ILP32 and LP64 data model cases, see also the sys/*/include/_limits.h.

Poudriere ran on both amd64 and i386 without problems with the desired and expected results.
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-02-24 21:43:58 UTC
A commit references this bug:

Author: cmt
Date: Wed Feb 24 21:43:00 UTC 2021
New revision: 566509
URL: https://svnweb.freebsd.org/changeset/ports/566509

Log:
  allow pgloader3 to build on 32bit platforms

  guess if we're on a 32bit platform and set a reduced DYNSIZE - else
  sbcl may hit it's adress space limits.

  PR:		253766
  Submitted by:	maintainer

Changes:
  head/databases/pgloader3/files/patch-Makefile
Comment 6 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2021-02-24 21:46:48 UTC
ok, let's try this. I'm not sure if this is the best approach - after all, we're probably not that interested in the size of a long but in the pointer size, but testing for that might even messier.
Anyways, committed ports r566509