Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Compiling mysql on CENTOS

  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

    Compiling mysql on CENTOS

    Hi all,

    Im trying to setup async mysql connection with libcod. However, no matter which github I use, I wont compile the mysql functions.
    Error using iznogods github (https://github.com/iznogod/libcod)
    Code:
    ##### COMPILE GSC_MYSQL.CPP #####
    cc1plus: error: unrecognized command line option "-std=gnu++11"
    So no mysql is not compiled
    Code:
    [olger@static libcod_iznogod]$ ./doit.sh cod2_1_0
    ##### COMPILE cod2_1_0 LIBCOD.CPP #####
    ##### COMPILE cod2_1_0 GSC.CPP #####
    ##### COMPILE cod2_1_0 GSC_PLAYER.CPP #####
    ##### COMPILE cod2_1_0 GSC_UTILS.CPP #####
    ##### LINK libcod2_1_0.so #####

    using Voron00 github (https://github.com/voron00/libcod)
    Code:
    ##### WARNING: MYSQL libs not found, MYSQL compilation skipped #####
    using kungs github (https://github.com/kungfooman/libcod)
    Code:
    ##### COMPILE JAVA_EMBED.C #####
    Ignore java_embed.c, because java_enable==false (e.g. because the dir $java_jdk=/root/helper/openjdk8 does not exist)
    Code:
    ##### COMPILE cod2_1_0 LIBCOD.CPP #####
    ##### COMPILE cod2_1_0 GSC.CPP #####
    ##### COMPILE cod2_1_0 GSC_PLAYER.CPP #####
    ##### COMPILE cod2_1_0 GSC_UTILS.CPP #####
    ##### LINK libcod2_1_0.so #####
    mysql not compiled?!

    using mitchs github (https://github.com/M-itch/libcod)
    Code:
    ##### WARNING: Skipped java_embed.c because OpenJDK 8 does not exist #####
    Code:
    ./doit.sh cod2_1_0
    ##### COMPILE cod2_1_0 LIBCOD.CPP #####
    ##### COMPILE cod2_1_0 GSC.CPP #####
    ##### COMPILE cod2_1_0 GSC_PLAYER.CPP #####
    ##### COMPILE cod2_1_0 GSC_UTILS.CPP #####
    ##### LINK libcod2_1_0.so #####
    objects_base/cracking.opp: could not read symbols: File in wrong format
    collect2: ld returned 1 exit status
    What the hell is going on?

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    The java crap can be ignored, was a thingy kung tried to add long ago but never did
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    Ni3ls (21st March 2016),Paho (28th March 2016)

  4. #3
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    I've recently added some sort of mysql detection (Since i moved my VPS to Arch Linux and the do not provide multilib mysql packages) which checks the existanse of libmysqlclient.so.18 inside /usr/lib and if its not found, mysql compilation will be skipped, if you sure you have mysql installed, just force it then, e.g set mysql_enable="true" in doit.sh after lib checks (e.g line 49)
    sudo apt-get rekt

  5. The Following User Says Thank You to voron00 For This Useful Post:

    Ni3ls (21st March 2016)

  6. #4
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Quote Originally Posted by voron00 View Post
    I've recently added some sort of mysql detection (Since i moved my VPS to Arch Linux and the do not provide multilib mysql packages) which checks the existanse of libmysqlclient.so.18 inside /usr/lib and if its not found, mysql compilation will be skipped, if you sure you have mysql installed, just force it then, e.g set mysql_enable="true" in doit.sh after lib checks (e.g line 49)
    It did compile, but I get segmentation fault by startup. No gametype or map is set at this point.

    Code:
    (gdb) bt
    #0  0x00a6bf1d in __memcpy_ssse3_rep () from /lib/libc.so.6
    #1  0xf76cda9a in gsc_utils_init ()
       from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #2  0xf76d1af9 in cCallOfDuty2Pro::cCallOfDuty2Pro() ()
       from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #3  0xf76d169b in lib_load () from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #4  0xf76d1b6d in __do_global_ctors_aux ()
       from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #5  0xf76c46e4 in _init () from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #6  0x0092101f in _dl_init_internal () from /lib/ld-linux.so.2
    #7  0x0091288f in _dl_start_user () from /lib/ld-linux.so.2
    (gdb)

  7. #5
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Dunno but seems unrelated to mysql, was there any other errors/warnings durning compilation?
    sudo apt-get rekt

  8. #6
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Quote Originally Posted by voron00 View Post
    Dunno but seems unrelated to mysql, was there any other errors/warnings durning compilation?
    Code:
    [olger@static libcod_voron]$ ./doit.sh base
    ##### COMPILE GSC_ASTAR.CPP #####
    ##### COMPILE GSC_MYSQL.CPP #####
    ##### COMPILE SERVER.C #####
    ##### COMPILE GSC_MEMORY.CPP #####
    ##### COMPILE CRACKING.CPP #####
    ##### COMPILE GSC_MATH.CPP #####
    ##### COMPILE JAVA_EMBED.C #####
    ##### WARNING: Skipped java_embed.c because /root/helper/openjdk8 does not exist #####
    [olger@static libcod_voron]$ ./doit.sh cod2_1_0
    ##### COMPILE cod2_1_0 LIBCOD.CPP #####
    ##### COMPILE cod2_1_0 GSC.CPP #####
    ##### COMPILE cod2_1_0 GSC_PLAYER.CPP #####
    ##### COMPILE cod2_1_0 GSC_UTILS.CPP #####
    ##### LINK libcod2_1_0.so #####
    [olger@static libcod_voron]$
    Thats all.



    BTW: Im using this method to compile
    http://killtube.org/showthread.php?2...ll=1#post10702

  9. #7
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Does it present in build from kung's or Mitch's repo too or just in mine?
    sudo apt-get rekt

  10. #8
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    In all the other ones I also got segmentation fault. And they were even build without mysql.

  11. #9
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Ni3ls View Post
    It did compile, but I get segmentation fault by startup. No gametype or map is set at this point.

    Code:
    (gdb) bt
    #0  0x00a6bf1d in __memcpy_ssse3_rep () from /lib/libc.so.6
    #1  0xf76cda9a in gsc_utils_init ()
       from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #2  0xf76d1af9 in cCallOfDuty2Pro::cCallOfDuty2Pro() ()
       from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #3  0xf76d169b in lib_load () from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #4  0xf76d1b6d in __do_global_ctors_aux ()
       from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #5  0xf76c46e4 in _init () from /home/olger/HIGHJUMP/libcod2_1_0_voron_v2.so
    #6  0x0092101f in _dl_init_internal () from /lib/ld-linux.so.2
    #7  0x0091288f in _dl_start_user () from /lib/ld-linux.so.2
    (gdb)
    CentOS doesn't like this function, but I have no idea why.
    PHP Code:
    chardefaultweapon_mp = (char*)malloc(MAX_WEAPON_NAME_SIZE);
    void gsc_utils_init() {
        
    strcpy(defaultweapon_mp"defaultweapon_mp");
        
    defaultweapon_mp[strlen(defaultweapon_mp)] = '\0';

    Edit: maybe try this:
    PHP Code:
    strcpy(defaultweapon_mp, (char*)"defaultweapon_mp"); 

  12. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    Ni3ls (21st March 2016),Paho (28th March 2016)

  13. #10
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Confirmed starting without those 2 lines, but the fix suggested doesnt work.

    It works fine without the gsc_utils_init though, so there's definitely a problem in there.

    This works though:
    PHP Code:

    #define MAX_WEAPON_IGNORE_SIZE 20
    #define MAX_WEAPON_NAME_SIZE 32
    char defaultweapon_mp[MAX_WEAPON_NAME_SIZE];
    char ignoredWeapons[MAX_WEAPON_IGNORE_SIZE][MAX_WEAPON_NAME_SIZE];
    int ignoredWeaponCount 0;

    void gsc_utils_init() {
            
    strcpy(defaultweapon_mp, (char*)"defaultweapon_mp");
            
    defaultweapon_mp[strlen(defaultweapon_mp)] = '\0';
    }

    void gsc_utils_free() {
            
    //free(defaultweapon_mp);

    Not sure if this fucks up anything anywhere else, please advise.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  14. The Following 3 Users Say Thank You to IzNoGoD For This Useful Post:

    Ni3ls (21st March 2016),Paho (28th March 2016),voron00 (21st March 2016)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •