Comments (14)
使用 CMake 方式进行编译,你的Ubuntu 是哪个发行版?
from pandas.
18.04
from pandas.
好的,晚些我整理一份操作手册出来
from pandas.
Ubuntu 18.04 编译 Pandas 模拟器
系统环境
使用 docker 下的 ubuntu:18.04 镜像
更新 apt-get 相关的数据源
- 先获取最新的 package list 以便使用:
apt-get update -y
- 对本机已经安装的各种包执行升级操作:
apt-get upgrade -y
安装 git
- 使用:
apt install git -y
安装 git 以便后面克隆代码仓库 - 使用:
git --version
确认安装的 git 版本,当下是:git version 2.17.1
安装 git-lfs
- 顺手安装 git-lfs 支持,部分仓库可能会需要用到
- 先执行:
apt install git-lfs -y
下载相关的包 - 然后执行:
git lfs install
安装钩子(提示 Git LFS initialized. 即表示初始化完成,可能会有一个 Error 提示当前的目录不是一个代码仓库,不用管)
安装 gcc 编译器
- 使用
apt install build-essential -y
安装 gcc 编译器 - 安装后使用:
gcc --version
确认版本为:7.4.0
安装 wget 等一些辅助工具
- 使用
apt install wget -y
安装 wget 指令
安装 cmake 3.16 版本
-
先安装编译 cmake 所需要的依赖库,如 OpenSSL 等:
apt install openssl libssl-dev -y
-
接下来下载、解压、配置,并编译安装 cmake 3.16 版本
wget https://github.com/Kitware/CMake/releases/download/v3.16.0-rc1/cmake-3.16.0-rc1.tar.gz \
&& tar -xzvf cmake-3.16.0-rc1.tar.gz \
&& cd cmake-3.16.0-rc1 \
&& ./bootstrap && make -j4 && make install
- 使用
cmake --version
确认版本为:cmake version 3.16.0-rc1
克隆 Pandas 模拟器代码
- 先切换到你想要存放 Pandas 代码的目录:
cd ~
- 执行克隆:
git clone https://github.com/PandasWS/Pandas.git
安装 Pandas 模拟器的依赖库
- 想要编译 Pandas 需要依赖一些库,先安装他们:
apt install libmysqlclient-dev zlib1g-dev libpcre3-dev -y
编译 Pandas 模拟器自带的 Boost 库
- 进入克隆下来的 Pandas 目录:
cd ~/Pandas
- 进入第三方组件 Boost 的目录:
cd 3rdparty/boost/
- 执行编译操作:
bash bootstrap.sh
获得 b2 程序 - 执行:
./b2
并回车,程序将开始编译 Boost
开始编译 Pandas
- 进入克隆下来的 Pandas 目录:
cd ~/Pandas
- 建立编译用临时目录:
mkdir cbuild
- 进入临时目录:
cd cbuild
- 使用 cmake 生成 makefile 文件:
cmake -G "Unix Makefiles" ..
- 执行编译:
make -j4
- 完成编译后,重新进入 Pandas 目录即可见到编译产物
from pandas.
可以试试看~ 有问题随时联系。 目前已知在编译地图服务器的时候,有一处警告:
/root/Pandas/src/map/script.cpp:4621:8: warning: extra tokens at end of #endif directive [-Wendif-labels]
#endif Pandas_ScriptCommand_SelfDeletion
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
我将会在下一个版本修正它,这并不影响我们的使用
from pandas.
请问还有其他问题么?
或者是上述的流程是否能够帮你完成编译?
如果没有问题的话,麻烦说一声哈,感谢~
from pandas.
感謝教學~~ 我是初學者~ 但無意間發現了熊貓模擬器~ 覺得可以從此模擬器入手探討~ 希望是好的開始
from pandas.
太好了 我就说 怎么 linux下的编译脚本都删除掉了
from pandas.
希望能把这个更新到文档区
from pandas.
整理了下 这些命令就可以了 准备做一个dockefile 方便部署
apt install libmysqlclient-dev zlib1g-dev libpcre3-dev cmake -y
git clone https://github.com/PandasWS/Pandas.git
cd ~/Pandas
cd 3rdparty/boost/
bash bootstrap.sh
./b2
cd ..
mkdir build
cd build
cmake -G "Unix Makefiles" ..
make -j4
from pandas.
但是编译完成后 执行程序
遇到下列错误
root@dev-server:~/Pandas# ./login-server
Floating point exception (core dumped)
测试平台1 ubuntu 20.04 + gcc 9.3.0
测试平台2 ubuntu 18.04 + gcc 7.5.0
原版rathena 可以编译通过正常运行
gdb 调试信息
Starting program: /root/Pandas/login-server
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGFPE, Arithmetic exception.
0x00005555557fd5fb in std::__detail::_Mod_range_hashing::operator() (
this=0x555555b87cf8 <translate_db+88>, __num=10983096385041811433,
__den=0) at /usr/include/c++/9/bits/hashtable_policy.h:433
433 { return __num % __den; }
from pandas.
@flufy3d 你在崩溃的环境下执行一下 locale 回车,我看下内容~ 是 zh-TW.utf8 么?
from pandas.
不是 是 C.utf8
from pandas.
@flufy3d 请问此问题后来解决了嘛?
from pandas.
Related Issues (20)
- 寵物光圈無法出現 HOT 2
- NPC點了就消失 HOT 7
- instancevar 系列指令在副本實例不存在時將導致地圖伺服器崩潰 HOT 1
- 疾風緩存未記錄 ap giveap 等參數 HOT 1
- 運行繁體中文翻譯腳本後,db大量報錯 HOT 3
- Implement Macro Detection Client Interface + Add support for loading captcha images HOT 2
- 希望能扩展CALLSHOP功能 HOT 1
- RELOAD DB的时候,会卡顿几秒 HOT 6
- [Expand/Implement] rentitem/rentitembound 支持多个物品租赁/支持物品绑定租赁
- [Implement] getrandomoptgroup 词条获得
- [Implement] 常见的数组(堆栈)方法
- [Expand] strnpcinfo 支持指定Npc Id HOT 4
- [Expand] convertpcinfo支持离线玩家查询
- [Implement] IgnoreRentWhenConsume 新增物品Flags
- [Implement] 使用DelayConsume类道具时获得所使用道具所在的背包序号
- Failed to open curl lib from binary, use libcurl.so instead HOT 5
- 希望能保持自動點擊必要技能傳統 HOT 3
- 重現RACN的allow_switch_weapon_when_damage
- 当前版本无法按照使用手册於 Ubuntu 22.04 (Linux) 系统编译熊猫模拟器自带的 Boost Libraries
- Ubuntu 22.04 无法按照官方文件之编译方法生成 makefile 文件 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandas.