xmake-io / xrepo

🗂️ A cross-platform C/C++ package manager based on Xmake
https://xrepo.xmake.io
Apache License 2.0
360 stars 16 forks source link

install mysql 5.7.29 .. failed #31

Closed zyjdmmm closed 1 year ago

zyjdmmm commented 1 year ago

Xmake 版本

2.7.4

操作系统版本和架构

centos 7.8

描述问题

xrepo install mysql

期待的结果

install mysql failed

工程配置

No response

附加信息和错误日志

[xmk@VM-4-3-centos ~]$ xrepo install mysql

note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> mysql 5.7.29 
please input: y (y/n/m)
  => install mysql 5.7.29 .. failed 

-- Running cmake version 3.26.0-rc2
-- Found Git: /usr/local/git/bin/git (found version "2.39.1") 
-- Configuring with MAX_INDEXES = 64U
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_GENERATOR: Unix Makefiles
-- Looking for SHM_HUGETLB
if you want to get more verbose errors, please see:
  -> /home/xmk/.xmake/cache/packages/2302/m/mysql/5.7.29/installdir.failed/logs/install.txt
error: install failed!
error: execv(xmake require -j 3 --extra={system=false} mysql) failed(255)
zyjdmmm commented 1 year ago

找到错误报告了:

-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
-- Configuring incomplete, errors occurred!

安装ncurses

xrepo install ncurses

成功了, 可是每次都要这样还是感觉有点麻烦呐,有没有更好的方案?。。。

waruqi commented 1 year ago

https://github.com/xmake-io/xmake-repo/blob/ffab59d9c4ec7182cde4e4d2500fe1fecaa50d52/packages/m/mysql/xmake.lua#L14

linux 下已经加了 ncurse deps ,会自动装才对,除非是找到系统库了,但是 mysql 的 cmake 没找到

可以改进 mysql 包,设置 CURSES_INCLUDE_PATH 改进下查找

zyjdmmm commented 1 year ago

虽然但是,报错是curse安装了ncurse好像也能用,这俩api接口没有区别吗?

waruqi commented 1 year ago

虽然但是,报错是curse安装了ncurse好像也能用,这俩api接口没有区别吗?

不同的库实现,但接口兼容,ncurses 更好些。

zyjdmmm commented 1 year ago

努力学习,争取早日能pr!