Skip to content
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

fixed compile issues and warnings for iOS platform #2852

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

kgbook
Copy link
Contributor

@kgbook kgbook commented Jan 12, 2024

fixed issue: exec_program is deprecated since version 3.0, CMake >= 3.28 prefer that this command never be called and the NEW behavior for this policy is to issue a FATAL_ERROR when the command is called.

fixed warning: cmake policy CMP0054.

update .gitignore: ignore files generated by CLion and CMake.

…rsion 3.0, CMake >= 3.28 prefer that this command never be called and the NEW behavior for this policy is to issue a FATAL_ERROR when the command is called.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (88c6214) 67.04% compared to head (2720118) 66.48%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2852      +/-   ##
==========================================
- Coverage   67.04%   66.48%   -0.56%     
==========================================
  Files         102      102              
  Lines       20368    20368              
==========================================
- Hits        13656    13542     -114     
- Misses       6712     6826     +114     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maxsharabayko maxsharabayko added the [build] Area: Changes in build files label Jan 12, 2024
@maxsharabayko maxsharabayko added this to the v1.5.4 milestone Jan 12, 2024
@maxsharabayko
Copy link
Collaborator

CMake 2.8.12 supports execute_proces 👍
Wonder why Travis build fails.

@ethouris
Copy link
Collaborator

But execute_process call syntax is possible with different parameters. Not every case of call syntax is supported on the old version.

@kgbook
Copy link
Contributor Author

kgbook commented Jan 12, 2024

CMake 2.8.12 supports execute_proces 👍 Wonder why Travis build fails.

I have no idea why Travis-CI build fails. I tried to get the job logs from travis-ci, but unable to access the job logs. It said:

"We're sorry, but this data is not available. Please check the repository settings in Travis CI."

If the travis-ci job log and CMake log are available, I would be happy to assist in identifying and resolving the issue.

@ethouris
Copy link
Collaborator

All I can see is that there's some initial cmake checks that finally gets "errors ocurred!" by completely no visible reason.

Rest of the things are post-factum and some general error report from a command.

@maxsharabayko
Copy link
Collaborator

Right, not much insight, except that obviously CMake fails somewhere.

...
$ if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then export CC="x86_64-w64-mingw32-gcc"; export CXX="x86_64-w64-mingw32-g++"; cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="OFF" -DUSE_OPENSSL_PC="OFF" -DOPENSSL_ROOT_DIR="$PWD/openssl" -DCMAKE_SYSTEM_NAME="Windows"; elif [ "$TRAVIS_OS_NAME" == "linux" ]; then cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="ON"; elif [ "$TRAVIS_OS_NAME" == "osx" ]; then export PKG_CONFIG_PATH=$(brew --prefix openssl)"/lib/pkgconfig"; cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="ON"; fi
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "/home/travis/build/Haivision/srt/CMakeFiles/CMakeOutput.log".
...

@kgbook
Copy link
Contributor Author

kgbook commented Jan 12, 2024

Right, not much insight, except that obviously CMake fails somewhere.

...
$ if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then export CC="x86_64-w64-mingw32-gcc"; export CXX="x86_64-w64-mingw32-g++"; cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="OFF" -DUSE_OPENSSL_PC="OFF" -DOPENSSL_ROOT_DIR="$PWD/openssl" -DCMAKE_SYSTEM_NAME="Windows"; elif [ "$TRAVIS_OS_NAME" == "linux" ]; then cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="ON"; elif [ "$TRAVIS_OS_NAME" == "osx" ]; then export PKG_CONFIG_PATH=$(brew --prefix openssl)"/lib/pkgconfig"; cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="ON"; fi
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "/home/travis/build/Haivision/srt/CMakeFiles/CMakeOutput.log".
...

See also "/home/travis/build/Haivision/srt/CMakeFiles/CMakeOutput.log".

@ethouris
Copy link
Collaborator

That's this problem with these machines. You can only run some script afterwards that will extract some information from the files, but you can't access files through any shell or something.

@maxsharabayko
Copy link
Collaborator

cmake version 3.5.1-1ubuntu3.

See also "/home/travis/build/Haivision/srt/CMakeFiles/CMakeOutput.log".

I'm afraid it is not available. What can be done is to echo the contents to the terminal in this PR.

@kgbook
Copy link
Contributor Author

kgbook commented Jan 12, 2024

But execute_process call syntax is possible with different parameters. Not every case of call syntax is supported on the old version.

The COMMAND and OUTPUT_VARIABLE options are supported in CMake version 3.0, as mentioned in the CMake v3.0 execute_process documentation.

No documents available for cmake version older than v3.0. While I have tested this functionality on CMake version 3.28, I cannot confirm its compatibility with CMake version 2.8.12.

@ethouris
Copy link
Collaborator

There are likely also other execute_process calls in the same file and if they work, their syntax should be followed.

@kgbook
Copy link
Contributor Author

kgbook commented Jan 12, 2024

There are likely also other execute_process calls in the same file and if they work, their syntax should be followed.

I have downloaded CMake version 2.8.12 from CMake release v2.8.12.2. Upon inspecting the CMakeLists.txt file at line 405, the syntax for the execute_process command appears to be the same, with COMMAND and OUTPUT_VARIABLE options supported.

execute_process(COMMAND ${CMAKE_CXX_COMPILER}
     ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
     OUTPUT_VARIABLE _GXX_VERSION
   )

This suggests that the syntax remains consistent even in CMake version 2.8.12.

@ethouris
Copy link
Collaborator

So, likely you have to modify the Travis execution configuration by checking the error from cmake command and dump its log file on the screen.

@maxsharabayko
Copy link
Collaborator

Right, the syntax seems to be the same. exec_program was already deprecated back then.
https://cmake.org/cmake/help/v2.8.12/cmake.html#command:execute_process

@maxsharabayko
Copy link
Collaborator

I suppose VERSION_GREATER_EQUAL was not there.
New in version 3.7.

CMakeLists.txt Outdated Show resolved Hide resolved
@kgbook
Copy link
Contributor Author

kgbook commented Jan 12, 2024

travis-ci build pass now.

@maxsharabayko maxsharabayko added the Type: Maintenance Work required to maintain or clean up the code label Jan 12, 2024
@maxsharabayko
Copy link
Collaborator

@kgbook Thanks a lot for this PR!

@maxsharabayko maxsharabayko merged commit 686d958 into Haivision:master Jan 12, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[build] Area: Changes in build files Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants