Results 1 to 8 of 8

Thread: libmysqlclient

  1. #1
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts

    libmysqlclient

    Hello, when starting my cod2 server. I got this weird thing on console
    PHP Code:
    /usr/lib/i386-linux-gnu/libmysqlclient.so.18no version information available (required by libcod/bin/libcod2_1_3.so
    I tried
    PHP Code:
    dpkg --add-architecture i386
    apt
    -get update
    apt
    -get install gcc-multilib
    apt
    -get install libmysqlclient-dev:i386
    apt
    -get install g++-multilib 
    Still getting it. Any solution ?

    Ubtunu
    Architecture: x86_64

  2. #2
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Try recompiling your lib.
    sudo apt-get rekt

  3. #3
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts
    Tried to. Also i'm using the lastest compiled libcod.
    killtube.org/downloads/libcod/

    This was working fine on 1.0 since i changed to 1.3 i get that error.

  4. #4
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Do not use precompiled lib. Build your own to have it properly linked with your mysql setup.
    sudo apt-get rekt

  5. #5
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts
    I don't know how.

  6. #6
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    PHP Code:
    cd $HOME
    git 
    clone https://github.com/voron00/libcod
    cd libcod
    ./doit.sh base
    ./doit.sh cod2_1_3 
    Your lib will be in libcod/bin folder.
    sudo apt-get rekt

  7. #7
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts
    Did that already !
    PHP Code:
    init() 

        
    //get your host, user, pass, db, port here 
        
    level.JH_mysql mysql_reuse_connection(); 
        if(!
    isDefined(level.JH_mysql)) 
            
    level.JH_mysql initMySQL("localhost""root""pwhere""dbhere"3306); 
        
    initAsyncMySQL("localhost""root""pwhere""dbhere"3306); 


    query(query

        if(!
    isDefined(level.JH_mysql)) 
            return 
    undefined
        
    result mysql_query(level.JH_mysqlquery); 
        
    resettimeout(); 
        if(
    result
        { 
            
    printf("Error in " query "\n"); 
            return 
    undefined
        } 
        
    result mysql_store_result(level.JH_mysql); 
        
    rows getRows(result); 
        return 
    rows


    queryNosave(query

        if(!
    isDefined(level.JH_mysql)) 
            return 
    undefined
        
    result mysql_query(level.JH_mysqlquery); 
        
    resettimeout(); 
        if(
    result
        { 
            
    printf("Error in " query "\n"); 
            return 
    undefined
        } 
        return []; 


    getRows(result

        if(!
    isDefined(result)) 
            return []; 
        
    rowcount mysql_num_rows(result); 
        
    fields = []; 
        
    field mysql_fetch_field(result); 
        while(
    isDefined(field)) 
        { 
            
    fields[fields.size] = field
            
    field mysql_fetch_field(result); 
        } 
        
    rows = []; 
        for(
    0rowcounti++) 
        { 
            
    row mysql_fetch_row(result); 
            
    rows[rows.size] = []; 
            for(
    0fields.sizej++) 
                
    rows[rows.size 1][fields[j]] = row[j]; 
        } 
        
    mysql_free_result(result); 
        return 
    rows


    asyncQuery(query, function, args

        
    id mysql_async_create_Query(query); 
        
    task spawnstruct(); 
        
    task.query query
        
    task.invoker self
        
    task.function = function; 
        
    task.args args
        
    level.JH_mysqlAsync["" id] = task


    asyncQueryNosave(query, function, args

        
    id mysql_async_create_Query_Nosave(query); 
        
    task spawnstruct(); 
        
    task.query query
        
    task.invoker self
        
    task.function = function; 
        
    task.args args
        
    level.JH_mysqlAsync["" id] = task


    initAsyncMySQL(hostuserpassdbport

        
    mysql_async_initializer(hostuserpassdbport4); 
        
    level.JH_mysqlAsync = []; 
        
    thread loopAsyncMySQL(); 


    loopAsyncMySQL() 

        while(
    true
        { 
            list = 
    mysql_async_GetDone_List(); 
            for(
    0< list.sizei++) 
            { 
                
    result mysql_async_getresult_and_free(list[i]); 
                if(!
    isdefined(result)) 
                    continue; 
                if(
    result == 0
                    
    result undefined
                
    task "" + list[i]; 
                if(
    isDefined(level.JH_mysqlAsync[task])) 
                { 
                    if(
    isDefined(level.JH_mysqlAsync[task].function)) 
                    { 
                        if(
    isDefined(level.JH_mysqlAsync[task].invoker)) 
                        { 
                            
    rows getRows(result); 
                            
    level.JH_mysqlAsync[task].invoker thread [[level.JH_mysqlAsync[task].function]](rowslevel.JH_mysqlAsync[task].args); 
                        } 
                        else if(
    isDefined(result)) 
                            
    mysql_free_result(result); 
                    } 
                    else if(
    isDefined(result)) 
                        
    mysql_free_result(result); 
                } 
                else if(
    isDefined(result)) 
                    
    mysql_free_result(result); 
                
    level.JH_mysqlAsync[task] = undefined
            } 
            
    wait .05
        } 


    initMySQL(hostuserpassdbport

        
    mysql mysql_init(); 
        
    ret mysql_real_connect(mysqlhostuserpassdbport); 
        if(!
    ret
        { 
            
    printf("errno=" mysql_errno(mysql) + " error= " mysql_error(mysql) + "\n"); 
            
    mysql_close(mysql); 
            return 
    undefined
        } 
        return 
    mysql

    stripString(string) 

        if(
    isDefined(level.JH_mysql)) 
            return 
    mysql_real_escape_string(level.JH_mysqlstring); 
        return 
    ""

    Of course i replaced "pwhere" by my pass and "dbhere" by my cod2 database.
    I got two sd.gsc, i wrote on maps\mp\gametypes\sd.gsc
    PHP Code:
    thread maps\mp\gametypes\_mysql::init(); 
    The other one is for pam mod.

    Any help ???

  8. #8
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts
    Fixed it. Forgot to open 3306 port XD

  9. The Following User Says Thank You to suck000 For This Useful Post:

    kubislav23 (21st July 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
  •