Opened 3 years ago

Closed 8 months ago

#54387 closed defect (worksforme)

CMake fails to determine size of 16-bit int

Reported by: mouse07410 (Mouse) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld@…
Port: cmake

Description

MacOS Sierra 10.12.5, Xcode-8.3.3. Symptom: trying to build gost-engine for OpenSSL, cmake fails:

$ cmake -DOPENSSL_PATH="${HOME}/src/openssl-1.1" ..
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at /opt/local/share/cmake-3.8/Modules/TestBigEndian.cmake:41 (message):
  no suitable type found
Call Stack (most recent call first):
  CMakeLists.txt:9 (TEST_BIG_ENDIAN)


-- Configuring incomplete, errors occurred!
See also "/Users/ur20980/src/grasshopper-engine/build/CMakeFiles/CMakeOutput.log".
See also "/Users/ur20980/src/grasshopper-engine/build/CMakeFiles/CMakeError.log".

CMake has been installed with "+docs +gui +python27 +qt5"

CMakeError.log attached.

Attachments (1)

CMakeError.log.txt (9.3 KB) - added by mouse07410 (Mouse) 3 years ago.
CMakeError.log

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by mouse07410 (Mouse)

Attachment: CMakeError.log.txt added

CMakeError.log

comment:1 Changed 3 years ago by kencu (Ken)

Is this done using MacPorts? Or on your own?

At any rate, the error seems to be:

clang: error: argument unused during compilation: '-L/Users/ur20980/src/openssl-1.1/lib' [-Werror,-Wunused-command-line-argument]

and doesn't appear to have anything to do with the size of a 16-bit int, as far as I can see.

comment:2 Changed 3 years ago by raimue (Rainer Müller)

This is the test compile for CheckTypeSize.cmake failing due to unused compiler arguments. I would assume this is somehow caused by the CMakeLists.txt of the project you are trying to compile.

One quick workaround to silence the warning would be to also add -Qunused-arguments to the compiler flags.

comment:3 Changed 3 years ago by kencu (Ken)

Maybe ... but then you'd have to explain where this line comes from:

$ cmake -DOPENSSL_PATH="${HOME}/src/openssl-1.1" ..

which has nothing to do with MacPorts at all .. and is likely the source of the error in the first place.

comment:4 Changed 3 years ago by mouse07410 (Mouse)

This error occurs when I try to compile an engine for OpenSSL, using Macports-installed cmake-3.8.2. That's where "OPENSSL_PATH" comes from.

The "...unused during compilation..." error appears to be the cause. And indeed, -Qunused-arguments remedied the situation.

Is there a way to make CMake configuration less susceptible to user-fed compiler flags?

comment:5 Changed 3 years ago by ryandesign (Ryan Schmidt)

I guess you should ask the cmake developers your question. I agree that it does not sound like a MacPorts-specific question.

comment:6 Changed 8 months ago by kencu (Ken)

Resolution: worksforme
Status: newclosed

please re-open with more information, mouse, if this is still and issue for you.

Note: See TracTickets for help on using tickets.