msys2로 PKGBUILD를 쓸 때 cmake를 사용할 때는 인수 전개에 주의를.
문제
PKGBUILD를 써 makepkg 하고 패키지를 인스톨 하면, /msys64/msys64/mingw64 가 install prefix가 되어 버렸다. /msys64/msys64/ 와는 일체···.
빌드 출력에서 발췌-- Install configuration: ""
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/lib/liblpsolve55.dll.a
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/bin/liblpsolve55.dll
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_bit.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_crash.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_explicit.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_fortify.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_Hash.h
 원인
PKGBUILD의 build()에서 cmake를 호출했지만,
PKGBUILD_build()  ${MINGW_PREFIX}/bin/cmake.exe \
    -G"MSYS Makefiles" \
    -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
    -DLIB_TYPE=SHARED \
    ../lp_solve_5.5
처럼 호출했다. 이때 MINGW_PREFIX는 /mingw64이다.
그러나
-- Install configuration: ""
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/lib/liblpsolve55.dll.a
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/bin/liblpsolve55.dll
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_bit.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_crash.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_explicit.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_fortify.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/msys64/mingw64/include/lpsolve/lp_Hash.h
PKGBUILD의
build()에서 cmake를 호출했지만,PKGBUILD_build()
  ${MINGW_PREFIX}/bin/cmake.exe \
    -G"MSYS Makefiles" \
    -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
    -DLIB_TYPE=SHARED \
    ../lp_solve_5.5
처럼 호출했다. 이때
MINGW_PREFIX는 /mingw64이다.그러나
에 있듯이, msys2는 인수 전개를 실시하기 (위해)때문에,
CMAKE_INSTALL_PREFIX 는 C:\msys2\mingw64 가 되어 버린다 (msys2 의 장소 의존).해결책
PKGBUILD_build()  MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
  ${MINGW_PREFIX}/bin/cmake.exe \
    -G"MSYS Makefiles" \
    -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
    -DLIB_TYPE=SHARED \
    ../lp_solve_5.5
배포를 차단합시다.
빌드 출력에서 발췌-- Install configuration: ""
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/lib/liblpsolve55.dll.a
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/bin/liblpsolve55.dll
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_bit.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_crash.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_explicit.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_fortify.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_Hash.h
 License
 CC BY 4.0
 
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(msys2로 PKGBUILD를 쓸 때 cmake를 사용할 때는 인수 전개에 주의를.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/yumetodo/items/af5d079c44421046c0ea
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
  MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
  ${MINGW_PREFIX}/bin/cmake.exe \
    -G"MSYS Makefiles" \
    -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
    -DLIB_TYPE=SHARED \
    ../lp_solve_5.5
-- Install configuration: ""
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/lib/liblpsolve55.dll.a
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/bin/liblpsolve55.dll
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_bit.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_crash.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_explicit.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_fortify.h
-- Installing: C:/msys64/home/yumetodo/patches/mingw-w64-lpsolve/pkg/mingw-w64-x86_64-lpsolve/mingw64/include/lpsolve/lp_Hash.h
CC BY 4.0
                Reference
이 문제에 관하여(msys2로 PKGBUILD를 쓸 때 cmake를 사용할 때는 인수 전개에 주의를.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/yumetodo/items/af5d079c44421046c0ea텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)