New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure Fails on OSF/1 (Tru64) on sizeof(wchar_t) Test with Compaq C #728
Comments
This looks like a broken compiler to me. It has wchar_t, but it doesn't provide a size for it?! |
The following compiles and runs just fine:
The compiler is fine. As I mentioned, something odd is occurring with compiler flags using Compaq C, which is why I included config.log. |
The applicable config.log lines:
EDIT: Actually, Compaq C seems to fail anytime there is
etc., etc. |
I don't know my C standards, but, apparently, the extra parentheses are the issue. The following program:
when compiled with the c89 standard in GCC, returns:
The above error occurs with GCC 5.3.1 on ARM. |
-std=c89 forces the hiding of But looking at the other tests makes me wonder: does this crappy CC pass down -Wall to the linker, without interpreting it and without otherwise failing on it?! That would explain why this test triggers it, it is the first link test after the check for -Wall support. |
Sigh... The type
GCC reports that something is expected prior to the parentheses closing the The question I have now is why does the configure script end up testing the above expression? This situation doesn't occur on Linux; the expression I've also tried configuring libarchive 3.1.2 on Tru64, and it works just dandy. The |
Most of the discussion is just misleading. The first wchar_t error is expected and not relevant. The real problem remains the #%@#$%#@$% option handling of the compiler. |
It appears that 9f6c6d5 broke building on Tru64. Prior to that commit, the compiler flags The issue with testing if the flags are supported is that Compaq C doesn't actually complain about them. Rather, they are simply passed to the linker if linking is requested (i.e. the
The above will work fine on Tru64's Compaq C compiler. However, if the test actually tried to link:
it would fail. I'm not exactly sure the best way to fix this test for a niche platform like Tru64 where the compiler doesn't complain about the flags, just the linker. |
I wonder if we should be using this: http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html instead of the current AX_APPEND_COMPILE_FLAGS([-Wall -Wformat -Wformat-security]) Or maybe we should be using ax_append_link_flags Could you try some of the above and let us know what works for you? |
Surprisingly, AX_CFLAGS_WARN_ALL doesn't work on Tru64 properly. It actually selected the Intel compiler flags I don't think we need any AX_APPEND_LINK_FLAGS changes since linking isn't the problem. |
If lines 81-82 in ax_cflags_warn_all.m4 is changed from:
to:
the proper flags are selected for warnings on at least GNU GCC and Compaq C. The configure script is able to complete sucessfully (and Thank you for the suggestions, @kientzle, they were quite helpful. |
Please file a bug with the autoconf maintainers about this issue and the fix you found:
|
I've "reported" it, though I've heard no response. |
Version 3.2.1 seems to fail to configure on Tru64 5.1B when using the Compaq C compiler:
checking whether UINTMAX_MAX is declared... no
checking whether SSIZE_MAX is declared... yes
checking whether EFTYPE is declared... yes
checking whether EILSEQ is declared... yes
checking for wchar_t... yes
checking size of wchar_t... configure: error: in '/root/Workspace/libarchive-3.2.1':
configure: error: cannot compute sizeof (wchar_t)
See 'config.log' for more details
The relevant config.log entries seem to suggest issues with some compiler flags:
config.log
Failed tests appear near line 11132 of the linked file.
The text was updated successfully, but these errors were encountered: