I am getting random number related error while using PLUTO astrophysical code. PLUTO code can be downloaded from this link.
/home/raman/Documents/pluto-4.4-patch3/PLUTO/Src/Math_Tools/math_random.c: In function ‘RandomNumber’:
/home/raman/Documents/pluto-4.4-patch3/PLUTO/Src/Math_Tools/math_random.c:94:9: error: implicit declaration of function ‘drand48’; did you mean ‘srand’? [-Wimplicit-function-declaration]
94 | rnd = drand48();
| ^~~~~~~
| srand
/home/raman/Documents/pluto-4.4-patch3/PLUTO/Src/Math_Tools/math_random.c: In function ‘RandomSeed’:
/home/raman/Documents/pluto-4.4-patch3/PLUTO/Src/Math_Tools/math_random.c:171:3: error: implicit declaration of function ‘srand48’; did you mean ‘srand’? [-Wimplicit-function-declaration]
171 | srand48(rnd_seq_seed);
| ^~~~~~~
| srand
make: *** [makefile:96: math_random.o] Error 1
[SOLVED] : - Manjaro uses latest GCC which is 14.2.1, while ubuntu uses 11.2.0 .In latest GCC drand48() function have been depreciated and so i have to manually replace it with rand() function. I did so and it worked fine. I was able to overcome this error by editing that drand48( ) and srand48( ) function with rand( ) and srand( ) respectively in pluto-4.4-patch3/PLUTO/Src/Math_Tools/math_random.c file in my PLUTO software directory.