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

I followed the introduction to build this project. But I always get many errors like these #591

Open
bigliam opened this issue May 18, 2021 · 6 comments

Comments

@bigliam
Copy link

bigliam commented May 18, 2021

/home/luban/miner/xdag-0.4.0/client/block.c:1170: undefined reference to g_rx_pool_mem_index' /home/luban/miner/xdag-0.4.0/client/block.c:1174: undefined reference to g_rx_pool_mem'
/home/luban/miner/xdag-0.4.0/client/block.c:1174: undefined reference to g_rx_pool_mem' /home/luban/miner/xdag-0.4.0/client/block.c:1174: undefined reference to g_rx_pool_mem'
/home/luban/miner/xdag-0.4.0/client/block.c:1174: undefined reference to g_rx_pool_mem' /tmp/ccc7QLBP.o: In function xdag_create_block':
/home/luban/miner/xdag-0.4.0/client/block.c:1053: undefined reference to is_randomx_fork' /home/luban/miner/xdag-0.4.0/client/block.c:1054: undefined reference to g_rx_pool_mem_index'
/home/luban/miner/xdag-0.4.0/client/block.c:1055: undefined reference to g_rx_hash_epoch_index' /home/luban/miner/xdag-0.4.0/client/block.c:1055: undefined reference to g_rx_pool_mem_index'
/home/luban/miner/xdag-0.4.0/client/block.c:1059: undefined reference to g_rx_pool_mem' /home/luban/miner/xdag-0.4.0/client/block.c:1060: undefined reference to g_rx_pool_mem_index'
/tmp/ccc7QLBP.o: In function rx_hash_difficulty': /home/luban/miner/xdag-0.4.0/client/block.c:2341: undefined reference to rx_block_hash'
/tmp/ccc7QLBP.o: In function add_block_nolock': /home/luban/miner/xdag-0.4.0/client/block.c:673: undefined reference to is_randomx_fork'
/tmp/ccc7QLBP.o: In function unset_main': /home/luban/miner/xdag-0.4.0/client/block.c:370: undefined reference to rx_unset_fork_time'
/tmp/ccc7QLBP.o: In function work_thread': /home/luban/miner/xdag-0.4.0/client/block.c:1253: undefined reference to rx_loading_fork_time'
/tmp/ccc7QLBP.o: In function set_main': /home/luban/miner/xdag-0.4.0/client/block.c:357: undefined reference to rx_set_fork_time'
/tmp/ccpvnhZg.o: In function xdag_init': /home/luban/miner/xdag-0.4.0/client/init.c:116: undefined reference to rx_init_flags'
/home/luban/miner/xdag-0.4.0/client/init.c:109: undefined reference to rx_init_flags' /tmp/ccvI9LAk.o: In function process_received_share':
/home/luban/miner/xdag-0.4.0/client/pool.c:884: undefined reference to is_randomx_fork' /home/luban/miner/xdag-0.4.0/client/pool.c:888: undefined reference to rx_pool_calc_hash'
/tmp/ccOgMoqT.o: In function mining_thread': /home/luban/miner/xdag-0.4.0/client/miner.c:386: undefined reference to xdag_rx_mine_worker_hash'
/tmp/ccOgMoqT.o: In function miner_net_thread': /home/luban/miner/xdag-0.4.0/client/miner.c:287: undefined reference to rx_mine_init_dataset'
/tmp/ccYiNv0n.o: In function processExitCommand': /home/luban/miner/xdag-0.4.0/client/commands.c:631: undefined reference to rx_pool_release_mem'
/home/luban/miner/xdag-0.4.0/client/commands.c:631: undefined reference to rx_pool_release_mem' /home/luban/miner/xdag-0.4.0/client/commands.c:631: undefined reference to rx_pool_release_mem'
collect2: error: ld returned 1 exit status
make: *** [xdag] Error 1

@MyronX
Copy link

MyronX commented May 20, 2021

Can you tell me the version of your operating system and the steps you followed?
Looks like it lacks a dependency on randomx. You can check if randomx is installed.
If you can tell me more detailed information, I can try to help you solve this problem

@bigliam bigliam closed this as completed May 25, 2021
@bigliam
Copy link
Author

bigliam commented May 25, 2021

@MyronX Emmm. The system is [Linux version 3.10.0-957.el7.x86_64] in a k8s container. And I checked the randomx.h file. It is under the path:[/usr/local/include/randomx.h]. So I guess randomx.h is correctly installed. What is more, I followed the instructions by "cd client && make" command.

Here is information when installing randomx:
[ 86%] Built target randomx
[ 93%] Built target randomx-benchmark
[ 96%] Built target randomx-codegen
[100%] Built target randomx-tests
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib64/librandomx.a
-- Up-to-date: /usr/local/include/randomx.h

@bigliam bigliam reopened this May 25, 2021
@MyronX
Copy link

MyronX commented May 25, 2021

maybe u use centos?
try this to build randomx

git clone https://github.com/tevador/RandomX.git
cd RandomX
mkdir build && cd build
cmake -DARCH=native ..
make
sudo make install

and try to open hugepage for randomx

  • Temporary open
sudo sysctl -w vm.nr_hugepages=2560
  • Permanent open
sudo bash -c "echo vm.nr_hugepages=2560 >> /etc/sysctl.conf"

then reboot system

See if this method solves your problem

@bigliam
Copy link
Author

bigliam commented May 25, 2021

maybe u use centos?
try this to build randomx

git clone https://github.com/tevador/RandomX.git
cd RandomX
mkdir build && cd build
cmake -DARCH=native ..
make
sudo make install

and try to open hugepage for randomx

  • Temporary open
sudo sysctl -w vm.nr_hugepages=2560
  • Permanent open
sudo bash -c "echo vm.nr_hugepages=2560 >> /etc/sysctl.conf"

then reboot system

See if this method solves your problem

I do actually build randomx in this way. Maybe rebooting is the key.

@MyronX
Copy link

MyronX commented May 25, 2021

maybe u use centos?
try this to build randomx

git clone https://github.com/tevador/RandomX.git
cd RandomX
mkdir build && cd build
cmake -DARCH=native ..
make
sudo make install

and try to open hugepage for randomx

  • Temporary open
sudo sysctl -w vm.nr_hugepages=2560
  • Permanent open
sudo bash -c "echo vm.nr_hugepages=2560 >> /etc/sysctl.conf"

then reboot system
See if this method solves your problem

I do actually build randomx in this way. Maybe rebooting is the key.

ok. Waiting for your feedback

@ductridev
Copy link

ductridev commented Aug 5, 2022

@MyronX I'm facing the same issue, but after I set hugepages and restart my machine, it is still not working.
image

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

No branches or pull requests

3 participants