Find the answer to your Linux question:
Results 1 to 10 of 10
Hi i am getting these error when compiling: ld: skipping incompatible /usr/lib64/libc.so when searching for -lc ld: skipping incompatible /usr/lib64/libc.a when searching for -lc ld: cannot find -lc What is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33

    Microfocus problem


    Hi

    i am getting these error when compiling:

    ld: skipping incompatible /usr/lib64/libc.so when searching for -lc
    ld: skipping incompatible /usr/lib64/libc.a when searching for -lc
    ld: cannot find -lc



    What is the library -lc????

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,752
    You are trying to compile some COBOL code? In any case, the error is saying what the problem is. Likely it is trying to link with code that is incompatible with your version of gcc/ld/etc. Check the Microfocus documentation for information as to which versions of gcc/ld will work with the software, or visit their web site - perhaps you need to update either the Microfocus code or your compiler suite.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,752
    FYI, -lc is the compiler directive to link libc.so or libc.a. It has found the 64-bit version of the library. Perhaps the other code is 32-bit, in which case, you need to make sure that your Makefile is specifying to look in /usr/lib for libraries first.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33
    Many thanks Rubberman. I will check documentation and everything else before posting again.

    I will let you know what happend.

  6. #5
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33
    Great now the -lc error doesn't happend anymore. It had to be some kind of linking error of the libraries cause after installation of the RHEL5.4 and adding the gcc it compiled pretty good.

    Though still one thing missing.

    If I try to compile with the DB2 i get:
    ** CE0001 sqlecm or dependant module not found

    I still see that:
    #find / -name "*sqlecm*"
    /opt/microfocus/cobol/lib/cobsqlecm.so.2
    #

    Doubt what can be the error. Anyway downloading the db2 FP1 fix pack and see if it fixes anything.

  7. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,752
    Well, at least your progress seems to be in a forward direction! From the current error, I think that the actual Oracle library that the cobsqlecm library is dependent upon is not available. Find it in the Oracle installation on your system (if it exists), and make sure you have a -L libdir directive pointing to that directory so it can find the required Oracle libraries.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #7
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33
    The sqlcem is a problem related to the 32-64 bit compativility:

    I install the cobol as 64-bit and found these on the Microfocus Knowledge Base (so had to install again the cobol as 32 bit and it work perfectly):

    Error Building a 64bit DB2 COBOL program on Windows
    Problem:

    When attempting to build a 64bit DB2 COBOL program on Windows the error:-

    SQLECM or dependant module is not found.

    is reported during compilation.
    Resolution:

    As of DB2 V9.5 IBM do not currently support 64bit DB2 COBOL programs on Windows.

  9. #8
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33
    Now the problem is with the MQ series (yes it seems that I am not problem free).

    When compilint COBOL with MQSeries I get:
    Cobol program "MQDISC" undefined. Assuming it will be dynamically loaded.
    Cobol program "MQGET" undefined. Assuming it will be dynamically loaded.
    Cobol program "MQOPEN" undefined. Assuming it will be dynamically loaded.
    Cobol program "MQCONN" undefined. Assuming it will be dynamically loaded.
    Cobol program "MQPUT" undefined. Assuming it will be dynamically loaded.
    Cobol program "MQCLOSE" undefined. Assuming it will be dynamically loaded.

    But the Result Code is 0 which means that the compilation is alright.

    But here comes the problem:
    When executing the cobol.exe (compile program) I get
    [gridp@grid06 FUENTES]$ PRUMQ.exe
    ERROR EN MQCONN +000000000+000000002+000002012

    Load error : file 'mFdfh_srv_address'
    error code: 173, pc=0, call=1, seg=0
    173 Called program file not found in drive/directory




    If I create the file mFdfh_srv_address (with random data) I get:

    ERROR EN MQCONN +000000000+000000002+000002012

    Load error : file 'mFdfh_srv_address'
    error code: 253, pc=0, call=1, seg=0
    253 Cannot load file - unsupported format

  10. #9
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33
    Well it seems that I manage to solve the error just added to the compilation line

    -l mqm -l mqicb -l mqmcs -l mqmzse -l mqmcb
    &
    -L /opt/mqm/lib (or whatever you might have those libs) (as well added this line to the LD_LIBRARY_PATH)

  11. #10
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33
    Quote Originally Posted by joaquin386 View Post
    Well it seems that I manage to solve the error just added to the compilation line

    -l mqm -l mqicb -l mqmcs -l mqmzse -l mqmcb
    &
    -L /opt/mqm/lib (or whatever you might have those libs) (as well added this line to the LD_LIBRARY_PATH)
    At the end even the above solution was not allowing me to connect to the MQSeries.
    Atfter some troubleshooting I used in the Cobol:

    -l mqmcb -l mqicb
    &
    -L /opt/mqm/lib

    So was able to connect and write to the MQSeries.

    Issue solved. Was writting these problem cause now it is registered somewhere.
    I was using RHEL 5.4

Posting Permissions

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