erlang/otp

Please fix configure for 32-bit platforms

barracuda156 opened this issue · 4 comments

Describe the bug
Recent release of erlang has unnecessarily broken configure for 32-bit platforms:

=== Running configure in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_erlang/erlang/work/otp_src_27.0/erts ===
./configure '--prefix=/opt/local' '--prefix=/opt/local' '--enable-threads' '--enable-dynamic-ssl-lib' '--enable-smp-support' '--without-odbc' '--without-javac' '--without-wx' '--disable-darwin-64-bit' '--with-ssl=/opt/local/libexec/openssl3' CFLAGS='-pipe -I/opt/local/libexec/openssl3/include -Os -arch ppc' LDFLAGS='-L/opt/local/libexec/openssl3/lib -Wl,-headerpad_max_install_names -framework CoreFoundation -lz -L/opt/local/lib -lMacportsLegacySupport -arch ppc' --disable-option-checking --cache-file=/dev/null --srcdir="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_erlang/erlang/work/otp_src_27.0/erts"
checking build system type... powerpc-apple-darwin10.0.0d2
checking host system type... powerpc-apple-darwin10.0.0d2
checking target system type... powerpc-apple-darwin10.0.0d2
checking for gcc... /opt/local/bin/gcc-mp-13
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /opt/local/bin/gcc-mp-13 accepts -g... yes
checking for /opt/local/bin/gcc-mp-13 option to enable C11 features... none needed
checking for library containing strerror... none required
checking OTP release... 27
checking OTP version... 27.0
checking for gcc... (cached) /opt/local/bin/gcc-mp-13
checking whether the compiler supports GNU C... (cached) yes
checking whether /opt/local/bin/gcc-mp-13 accepts -g... (cached) yes
checking for /opt/local/bin/gcc-mp-13 option to enable C11 features... (cached) none needed
checking whether the compiler supports GNU C++... yes
checking whether /opt/local/bin/g++-mp-13 accepts -g... yes
checking for /opt/local/bin/g++-mp-13 option to enable C++11 features... none needed
checking for grep that handles long lines and -e... /opt/local/bin/ggrep
checking for egrep... /opt/local/bin/ggrep -E
checking how to run the C preprocessor... /opt/local/bin/gcc-mp-13 -E
checking for ranlib... ranlib
checking for bison... bison -y
checking for perl5... /opt/local/bin/perl5
checking whether ln -s works... yes
checking for ar... ar
checking for ex_doc... no
configure: WARNING: No 'ex_doc' command found: it will (optionally) be downloaded when building the HTML documentation 
checking for elixir... elixir
checking for a BSD-compatible install... /usr/bin/install -c
checking how to create a directory including parents... /usr/bin/install -c -d
checking for mixed mingw-gcc and native VC++ environment... no
checking for mixed cygwin and native MinGW environment... no
checking if we mix cygwin with any native compiler... no
checking if we mix msys with another native compiler... no
checking if we mix WSL with another native compiler... no
checking for /opt/local/bin/gcc-mp-13 option to enable large file support... none needed
checking for /opt/local/bin/gcc-mp-13 option for timestamps after 2038... support not detected
configure: error: in '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_erlang/erlang/work/otp_src_27.0/erts':
configure: error: could not enable timestamps after mid-January 2038.
This package recommends support for these later
timestamps. However, to proceed with signed 32-bit
time_t even though it will fail then, configure with
'--disable-year2038'.
See 'config.log' for more details
ERROR: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_erlang/erlang/work/otp_src_27.0/erts/configure failed!
./configure: line 370: kill: (-3122) - No such process
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_erlang/erlang/work/otp_src_27.0" && ./configure --prefix=/opt/local --prefix=/opt/local --enable-threads --enable-dynamic-ssl-lib --enable-smp-support --without-odbc --without-javac --without-wx --disable-darwin-64-bit --with-ssl=/opt/local/libexec/openssl3 
Exit code: 1

To Reproduce
Try building erlang on a 32-bit platform.

Expected behavior
Configure should use appropriate options depending on a platform.

Affected versions
27

It was a long time since I saw anyone running a OS X powerpc machine :) The error is intentional and will remain. Please use the adviced configure flag on that platform, it is impossible/very hard for us to detect whether it supports 64-bit timestamps or not.

It was a long time since I saw anyone running a OS X powerpc machine :) The error is intentional and will remain. Please use the adviced configure flag on that platform, it is impossible/very hard for us to detect whether it supports 64-bit timestamps or not.

@garazdawi Thank you for responding.

Wouldn’t it suffice to use the first component of a triple, like it is normally done in makefiles/autotools builds?
If it is powerpc-apple-darwin*, it does not support 64-bit timestamps (physical CPU is irrelevant, it is not necessary to know if it supports ppc64 as such). If it is powerpc64-apple-darwin*, it will support 64-bit stuff.

Also it seems unnecessary to have two independent configure arguments. We already set --disable-darwin-64-bit, but it still requires --disable-year2038. Why is it this way?

As year 2038 is steadily approaching (only 14 years left!) and systems running on 32-bit architectures tend to be small embedded deviced that run for years if not decades we have decided to make it a configure error to not have 64-bit time support so that the user is aware of this problem.

Consider this our small nudge in order to make all systems year 2038 safe. It is easily disabled by anyone that wants to continue without year2038 support, so we will not be adding any extra rules for any OS/architecture.

@garazdawi Ok, got it, thank you for a clarification. We can live with it: I submitted a fix to MacPorts (we already have an arch-based condition in the port, so only need to add an extra flag into it).