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

Cmake #8605

Merged
merged 1 commit into from Jul 11, 2022
Merged

Cmake #8605

merged 1 commit into from Jul 11, 2022

Conversation

erwinlem
Copy link
Contributor

Fixes for cmake.mk, related to #8552.

@AndWac AndWac requested a review from Toasterson July 10, 2022 16:57
@Toasterson
Copy link
Contributor

We have LDFLAGS and PKG_CONFIG_PATH now twice in env.
The Original Idea was that they are in env and command so cmake actually picks one because it was inconsistent which it picked. If they have not been added to your build env then thats another bug.

Library architecture looks good. Please leave LDFLAGS and PKG_CONFIG_PATH be for now. We have to look at that seperately.

(cd /ws/toasty/oi-userland/components/shell/fish/build/amd64 ; /usr/bin/env CONFIG_SHELL="/bin/bash" \
CC="/usr/gcc/7/bin/gcc" CXX="/usr/gcc/7/bin/g++" F77="/usr/gcc/7/bin/gfortran" FC="/usr/gcc/7/bin/gfortran"\
 CFLAGS="-m64 -O3 " CXXFLAGS=" -m64 -O3 " FFLAGS=" -m64 -O3 " FCFLAGS="-m64 -O3 "\
 LDFLAGS="-m64" PKG_CONFIG_PATH="/usr/openssl/1.0/lib/64/pkgconfig:/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig" LDFLAGS="-m64" PKG_CONFIG_PATH="/usr/openssl/1.0/lib/64/pkgconfig:/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig"  \
        cmake -DCMAKE_C_COMPILER:STRING="/usr/gcc/7/bin/gcc" -DCMAKE_CXX_COMPILER:STRING="/usr/gcc/7/bin/g++" -DCMAKE_Fortran_COMPILER:STRING="/usr/gcc/7/bin/gfortran" -DCMAKE_C_FLAGS:STRING="-m64 -O3 " -DCMAKE_CXX_FLAGS:STRING=" -m64 -O3 " -DCMAKE_Fortran_FLAGS:STRING="-m64 -O3 " -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_LIBDIR:PATH=lib/amd64 -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DCMAKE_INSTALL_DATADIR:PATH=share -DCMAKE_INSTALL_INFODIR:PATH=share/info -DCMAKE_INSTALL_LOCALEDIR:PATH=share/locale -DCMAKE_INSTALL_MANDIR:PATH=share/man -DLIBEXEC_INSTALL_DIR="/usr/lib/amd64" -DLIB_INSTALL_DIR="/usr/lib/amd64" -DCMAKE_LIBRARY_ARCHITECTURE=amd64 -DLIB_SUFFIX="/amd64" -DCMAKE_INSTALL_SYSCONFDIR="/etc" -DPCRE2_INCLUDE_DIR=/usr/include/pcre /ws/toasty/oi-userland/components/shell/fish/fish-3.5.0)

Copy link
Contributor

@Toasterson Toasterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LDFLAGS/PKG_CONFIG_PATH get added to CMAKE_ENV on line 98 and 99 not needed here

…vents cmake from picking up the 32bit version when compiling for 64bit.

To test make a CMakeLists.txt:

find_library(XTEST X11)
message("Found X11 at ${XTEST}")

And compile with :

cmake .
rm CMakeCache.txt
cmake -DCMAKE_LIBRARY_ARCHITECTURE=amd64 .
@erwinlem
Copy link
Contributor Author

I removed the LDFLAGS commit, that only generated warnings and does not break anything.

@AndWac AndWac merged commit b5e5203 into OpenIndiana:oi/hipster Jul 11, 2022
@erwinlem erwinlem deleted the cmake branch July 11, 2022 09:24
Copy link
Contributor

@alarcher alarcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing LDFLAGS and PKG_CONFIG_PATH as options is incorrect, Line 13à and 131 need be removed.

@AndWac
Copy link
Contributor

AndWac commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants