IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Linux Compile error
RoboCop
post Nov 4 2017, 05:26 PM
Post #1


Advanced Member
***

Group: Moderator
Posts: 52
Joined: 17-December 15
From: Dundee, Scotland
Member No.: 2,435



Hello I've been trying to recompile RCBot2 for Linux on this new Linux Mint PC, but it seems that the gnu-i386 string headers based on "memset"

CODE
mint@mint-computer ~/Dropbox/src/rcbot2/linux_sdk $ make -f Makefile.rcbot2
if [ -z "cc" ]; then echo "Compiler not defined."; exit; fi
if [ ! -d . ];then mkdir .;fi
cd .
# if [ ! -f "libtier0.so" ]; then ln -s ./gamedir/bin/libtier0.so .; fi
# if [ ! -f "libvstdlib.so" ]; then ln -s ./gamedir/bin/libvstdlib.so .; fi
#    if [ ! -f "libsteam_api.so" ]; then ln -s ./gamedir/bin/libsteam_api.so .; fi
# When running over samba we need to copy the files because symlinking isn't possible.
#    cp -f ./gamedir/bin/tier0_i486.so .
#    cp -f ./gamedir/bin/vstdlib_i486.so .
#    cp -f ./gamedir/bin/steam_api_i486.so .
make -f Makefile.server CC=cc CPLUS=/usr/bin/g++-4.9 CPP_LIB=" /usr/lib/gcc/i686-linux-gnu/4.9/libstdc++.a /usr/lib/gcc/i686-linux-gnu/4.9/libgcc_eh.a" BUILD_DIR=. BUILD_OBJ_DIR=./obj SRC_DIR=~/Documents/rcbot-svn/rcbot2-code-468 SHLIBLDFLAGS=-shared -Wl,-Map,server_map.txt -Wl SHLIBEXT=so CLINK=/usr/bin/gcc-4.9 CFLAGS="-std=c++11 -w -D__linux -g   -mtune=generic -march=i686 -mmmx -msse -msse2 -pipe -m32 -O1 -fomit-frame-pointer -fforce-addr -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -finline-functions -funswitch-loops -fgcse-after-reload -DVPROF_LEVEL=1 -DSWDS -D_LINUX -DLINUX -DNDEBUG -fpermissive -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -D__linux__ -DSOURCE_ENGINE=4 -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6 -DSE_ALIENSWARM=7 -Usprintf=use_Q_snprintf_instead_of_sprintf -Ustrncpy=use_Q_strncpy_instead -Ufopen=dont_use_fopen -UPROTECTED_THINGS_ENABLE" LDFLAGS="-m32 -lm -ldl -Wl,-no-undefined -L. -L../lib/linux -Wl,-soname -Wl,--no-as-needed -l:mathlib_i486.a -l:libtier0_srv.so -l:tier1_i486.a -l:tier2_i486.a -l:tier3_i486.a -l:libvstdlib_srv.so -lpthread" DBG_CFLAGS="-std=c++11 -w -D__linux -g   -mtune=generic -march=i686 -mmmx -msse -msse2 -pipe -m32 -O1 -fomit-frame-pointer -fforce-addr -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -finline-functions -funswitch-loops -fgcse-after-reload -DVPROF_LEVEL=1 -DSWDS -D_LINUX -DLINUX -DNDEBUG -fpermissive -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -D__linux__ -DSOURCE_ENGINE=4 -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5 -DSE_LEFT4DEAD2=6 -DSE_ALIENSWARM=7 -Usprintf=use_Q_snprintf_instead_of_sprintf -Ustrncpy=use_Q_strncpy_instead -Ufopen=dont_use_fopen -UPROTECTED_THINGS_ENABLE" ARCH=i486 GAME_DIR=./gamedir MOD_CONFIG=HPB_bot2_Release_NonHomeFolderWin32 NAME=HPB_bot2_meta XERCES_INC_DIR=/opt/include XERCES_LIB_DIR=/opt/lib SOURCE_DIR=..
make[1]: Entering directory '/home/mint/Dropbox/src/rcbot2/linux_sdk'
mkdir -p obj/HPB_bot2_meta_i486/utilCBot2_metmeta
/usr/bin/gcc-4.9 -shared  -o ./HPB_bot2_meta_i486.so obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_accessclient.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_buttons.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_client.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_commands.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_configfile.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_coop.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_css_bot.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_dod_bot.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_dod_mod.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_events.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_fortress.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_ga.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_ga_ind.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_getprop.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_globals.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_hl1dmsrc.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_hldm_bot.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_kv.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_menu.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_mods.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_mtrand.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_navmesh.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_perceptron.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_profile.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_profiling.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_schedule.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_tf2_points.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_som.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_squads.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_strings.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_task.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_tf2_mod.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_usercmd.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_utility.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_visibles.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_waypoint.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_waypoint_locations.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_waypoint_visibility.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_weapons.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_wpt_dist.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_zombie.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_sigscan.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_cvars.o obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot_plugin_meta.o  -m32 -lm -ldl -Wl,-no-undefined -L. -L../lib/linux -Wl,-soname -Wl,--no-as-needed -l:mathlib_i486.a -l:libtier0_srv.so -l:tier1_i486.a -l:tier2_i486.a -l:tier3_i486.a -l:libvstdlib_srv.so -lpthread /usr/lib/gcc/i686-linux-gnu/4.9/libstdc++.a /usr/lib/gcc/i686-linux-gnu/4.9/libgcc_eh.a
obj/HPB_bot2_meta_i486/utilCBot2_metmeta/bot.o: In function `memset':
/usr/include/i386-linux-gnu/bits/string3.h:86: undefined reference to `__warn_memset_zero_len'
collect2: error: ld returned 1 exit status
Makefile.HPB_bot2_Release_NonHomeFolderWin32:66: recipe for target 'HPB_bot2_meta_i486.so' failed
make[1]: *** [HPB_bot2_meta_i486.so] Error 1
make[1]: Leaving directory '/home/mint/Dropbox/src/rcbot2/linux_sdk'
Makefile.rcbot2:142: recipe for target 'server' failed
make: *** [server] Error 2


Also I did some other experiments with RCBot like adding the newer MM:Source src code for compiling the RCBot2_Meta addon as well other stuff like trying to recompile RCBot on Clang and on GCC 5, but they seem to be only compatible on GCC 4.8 or 4.9. I did try to add a GCC Toolchain for Clang but I think I may of missed a step, but I don't have the full experience on using Clang.

I am posting my Github commit changes here below. As for Win32 RCBot2 binaries...they seem to be compiled fine on VS2017 using the VS2013 Compiler kit.

https://github.com/APGRoboCop/rcbot2/commit...199410622e8dff7
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 15th December 2017 - 12:42 AM