#454 compile problem on hpux11.23. Urgent!

Platform Specific
closed-invalid
5
2012-03-03
2007-11-23
Arthur Zhu
No

My server is: HP Integrity rx2620 hpux11.23.

I want to compile one source which needs to link libexpat.a on hpux. The message always as following:
ld: Can't find library or mismatched ABI for -lexpat
Fatal error.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

I downloaded a version from http://hpux.cs.utah.edu/ which was special for hpux11.23. After installing expat, I copied the libexpated to my source's lib folder, compiled again, also couldn't find expat library.

Then, I downloaded expat source. First, did ./configure, then did make. When making, message was:
ld: Unknown input file type: "./.libs/libexpat.so"
Fatal error.
*** Error exit code 1
Under .libs folder, libexpat.a and libexpat.so had been created.
I copied this licexpat.a to my lib folder, also couldn't use.

The same source, I compiled on AIX5.3, Linux, Windows.... no problem.

Anybody could explain? Kindly thanks!

Kind Regards,
Arthur Zhu

Discussion

  • mauad

    mauad - 2007-11-26

    Logged In: YES
    user_id=1516525
    Originator: NO

    This looks weird.

    After downloading sources, I'd built expat on an Itanium server using the following setup:

    * gcc -v:
    Using built-in specs.
    Target: ia64-hp-hpux11.23
    Configured with: ../gcc/configure
    Thread model: posix
    gcc version 4.1.1

    GNU Make 3.81

    After building the vanilla version (running ./configure)
    with:
    * make
    * make install

    the files under examples/ were built, and the uutput was the expected upon some XML files.

    Note that the propper .so was built:
    * ldd /usr/local/lib/libexpat.so

    /usr/local/lib/libexpat.so: ELF-32 shared object file - IA64

    It seems that your HPUX depot is influencing the linker.

    Try out this steps:

    1. Check which depot was downloaded (look for the IA64 one! there is a PA and a IA64 version for 11.23)
    with file $PATH_TO_EXPAT_LIB/libexpat.so

    2(a). If the depot is wrong, you don't have a bug
    2(b). If the depot is ok, uninstall it before rebuilding
    3. Rebuild expat from scratch with ./configure, make make install
    5. Change to examples/ and execute gcc -o elements elements.c -lexpat
    6. Try it out with elements < file.xml

    Mauad

     
  • Arthur Zhu

    Arthur Zhu - 2007-11-27
    • status: open --> closed
     
  • Arthur Zhu

    Arthur Zhu - 2007-11-27

    Logged In: YES
    user_id=1943705
    Originator: YES

    Hi, mauad,

    I'm so glad to get response from you.
    I found the problem.
    First, the depot is ok.
    But when I compiled source(Version2.0.1), error occured.
    My step was:
    ./configure
    make // when making, can't find libexpat.a.
    I checked the "Makefile". Changed the line 106: from "CC = cc" to "CC = cc +DSitanium2 + DD64 +w1". Then make again, also had some problem. But the libexpat.a could be used.
    I thought that's the problem. If I didn't change "Makefile", compiled libexpat.a is 32bit, after changed, compiled libexpat.a is 64bit.

    Kind Regards,
    Arthur Zhu in Shanghai

     
  • mauad

    mauad - 2007-11-27

    Logged In: YES
    user_id=1516525
    Originator: NO

    Hi Arthur!

    Thanks!

    I'm sorry, but I had not figured out that your CC was cc. Mine was gcc ;)
    I had a similar problem with sqlite some time ago. Subtle gotchas.

    Best regards.
    Mauad, from Porto Alegre, Brazil

     
  • Arthur Zhu

    Arthur Zhu - 2007-11-27

    Logged In: YES
    user_id=1943705
    Originator: YES

    Hi Mauad,

    I'm so glad to hear from you.

    I also used sqlite. But I'm not familiar with it.
    My projects are usually under Windows Platform. But the project needs to run under Linux, AS400, Solaris, hpux, AIX, Windows. I'm not famaliar with Unix and Linux.
    My msn: dongpaidoudou@msn.com
    Email: arthurzhuwei@gmail.com or gongxifacai@yahoo.cn

    Could you tell me your msn or mail address? If I have some problem, I think I could get help from you.
    Thanks!

    Kind Regards,
    Arthur Zhu

     
  • Karl Waclawek

    Karl Waclawek - 2012-03-03
    • status: closed --> closed-invalid
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks