Bug 233099 - databases/postgresql96-client Configure complains about SSE2 32bit support on amd64
Summary: databases/postgresql96-client Configure complains about SSE2 32bit support on...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: pgsql
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-09 23:16 UTC by Rob Belics
Modified: 2020-09-30 21:04 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (pgsql)


Attachments
config.log (88.53 KB, text/plain)
2018-11-09 23:18 UTC, Rob Belics
no flags Details
packages (12.50 KB, text/plain)
2018-11-09 23:18 UTC, Rob Belics
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Belics 2018-11-09 23:16:47 UTC
Tried to update this on my server and desktop workstation, both amd64 11.2-RELEASE-p4. I don't understand the complaint regarding clang and 32bit x86.

checking whether the C compiler still works... yes
configure: error: Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc.
===>  Script "configure" failed unexpectedly.

See attachments
Comment 1 Rob Belics 2018-11-09 23:18:11 UTC
Created attachment 199100 [details]
config.log
Comment 2 Rob Belics 2018-11-09 23:18:35 UTC
Created attachment 199101 [details]
packages
Comment 3 Walter Schwarzenfeld 2018-11-10 00:11:03 UTC
add to the Makefile

.if ${ARCH} == "i386"
CFLAGS+=        -msse2
.endif
Comment 4 Palle Girgensohn freebsd_committer freebsd_triage 2018-11-11 00:17:16 UTC
Hi,

While it seems to be a simple fix to add -msse2 for i386 architecture, can I be sure whis will always work? And how come I cannot reproduce it using poudriere? (see also post to ports@ with the same question).
Comment 5 Walter Schwarzenfeld 2018-11-11 01:28:37 UTC
The same fix is in postgresql11-server/client and in ~ two dozens other ports.

btw, new syntax:

CFLAGS_i386= -msse2
Comment 6 Walter Schwarzenfeld 2018-11-11 02:08:01 UTC
...and:

configure: error: Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc.
===>  Script "configure" failed unexpectedly.
Please report the problem to pgsql@FreeBSD.org [maintainer] and attach the
"/wrkdirs/usr/ports/databases/postgresql96-client/work/postgresql-9.6.11/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/databases/postgresql96-client
=>> Cleaning up wrkdir
===>  Cleaning for postgresql96-client-9.6.11_1
build of databases/postgresql96-client | postgresql96-client-9.6.11_1 ended at Sun Nov 11 03:01:55 CET 2018
Comment 7 Walter Schwarzenfeld 2018-11-11 02:14:47 UTC
Forgot: Comment6 without fix. (Builds fine with the fix).
Comment 8 Palle Girgensohn freebsd_committer freebsd_triage 2018-11-12 15:55:57 UTC
(In reply to Rob Belics from comment #0)

It seems the config.log is not from amd64 but from i386.

...
uname -m = i386
...

Right?
Comment 9 Palle Girgensohn freebsd_committer freebsd_triage 2018-11-12 15:57:00 UTC
(In reply to w.schwarzenfeld from comment #5)

will SSE2 work for *all* CPU:s? another option would be using GCC?
Comment 10 Palle Girgensohn freebsd_committer freebsd_triage 2018-11-12 15:59:27 UTC
I've updated the port to use GCC instead of CLANG.

I am not sure using SSE2 is a fix for any CPU, but this is not my area of expertise. Maybe someone with more knowledge would care to comment on whether SSE2 or GCC is the best option?

Palle
Comment 11 Palle Girgensohn freebsd_committer freebsd_triage 2018-11-12 16:00:53 UTC
It seems SSE2 was introduced with Pentium 4! Do we support anything older than that?
Comment 12 Franco Fichtner 2018-11-12 16:05:49 UTC
SSE2 will probably throw errors for unknown instructions for some people despite the age. Hyperscan went through a similar issue and is therefore not used as a dependency of Suricata on i386. GCC if fully portable is the better option, although that still feels like overkill. :/


Cheers,
Franco
Comment 13 Palle Girgensohn freebsd_committer freebsd_triage 2020-09-30 21:04:55 UTC
The postgresql ports have used gcc for i386 for some time now. This PR should have been closed a long time ago.