stupid semi-newbie question

Discussion in 'Programming/Scripts' started by craig baker, May 6, 2008.

  1. craig baker

    craig baker Member HowtoForge Supporter

    I've built myself a shiny centOs 5.1 server and am in the process of migrating from an aging fedora core 2 server, and I've run into a problem.
    I have an application built under fedora 2 that used 2 libraries supplied by the pseudo-developer. so far so good all linked up and worked.
    but under centos, the libraries are rejected as incompatible.
    and pseudo-developer has no updated libraries since 2004 (no joke) - and the only versions they have are for rh6,rh7,rh8 and rh9 (I think I used the rh9 ones for fedora core 2).
    I dont have the source code for the two incompatible libraries (of course) - but is there any trick that would let me bind them in in some compatibility mode?
    or is there an older version of gcc available that might install along side the current version that would make a current-kernel-ok binary using the old libraries.
    and I'm running the x64 kernel. am I being stupid trying to link 2 32-bit libraries into a binary at all?
    who's going to win in Indiana and NC tonight?

    inquiring minds and all that
    thanks
    cdb.

    am I making sense?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    I don't think this will work.

    Have you tried http://rpm.pbone.net to find packages for CentOS?
     
  3. craig baker

    craig baker Member HowtoForge Supporter

    alas - no source or rpm available

    the libraries in question are proprietary :(
    so I'm not going to find them anywhere.

    any way to install and older gcc from the fedora 2 age to try and recompile?
    I assume I could compile it as 32-bit only, and avoid any 64bit-32bit conflicts.

    cdb.
     
  4. craig baker

    craig baker Member HowtoForge Supporter

    more info and maybe a path to success?

    putting -m32 in the make file to force 32bit compilation eliminated the incompatible library errors (confirming they are pure 32bit).

    but the binary gets a link error:
    /usr/bin/ld: warning: libstdc++.so.5, needed by ./liblptxn.so, may conflict with libstdc++.so.6

    and the binary segfaults. now from what I've determined it looks like I need to install and older gcc version.

    the fedora core 2 system had gcc-3.3.3 installed.

    so can I safely install gcc-3.3.3 and use it to compile and link this on my 64bit centos system?
    and where is gcc-3.3.3 to be found these days. can I yum it?
    how to install it safely?
    and how do I keep the 2 compilers separate? I may possibly have to do this again in future as I migrate off the fedora 2 server...

    thanks for your help.
    cdb.
     
  5. craig baker

    craig baker Member HowtoForge Supporter

    one more thing

    I see reference to gcc-3.3.3* rpms for various distributions and under centos 5 I see compat-libstd* rpms.
    do I need either or both?
    cdb.
     
  6. craig baker

    craig baker Member HowtoForge Supporter

    looked at the repository

    I looked in the repository you listed and only gcc-3.3.3 it finds is 3.3.3.7 for suse and fedora 2
    nothing for centos.
    there may be srpms - can I recompile it under centos5?
    any chance that would work?
     
  7. falko

    falko Super Moderator Howtoforge Staff

  8. craig baker

    craig baker Member HowtoForge Supporter

    I can try installing

    anything special I need to do with the rpms since I dont want to overwrite the gcc 4.1 that comes with centos 5.1?

    thanks for your help
    cdb.
     
  9. falko

    falko Super Moderator Howtoforge Staff

    I don't think it will overwrite gcc-4.1, but install additional gcc versions in /usr/bin. I think you should create a symlink from /usr/bin/gcc to the gcc version you want to use afterwards.
     
  10. craig baker

    craig baker Member HowtoForge Supporter

    trying it...

    I tried downloading 3.2.3 and

    rpm -i gcc-3.2.3-etc gave me a required dependency for cpp-3.2.3
    downloading and rpm -i cpp-3.2.3 gave me lots of warnings that
    files were conflicting with the same files from gcc-4.1-etc.

    if I use --force it will surely overwrite those files - how do I get rpm to install
    them differently?

    cdb.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    In this case you shouldn't install the rpms. But I'm not sure what to do then...
     
  12. craig baker

    craig baker Member HowtoForge Supporter

    Newbie question 1 solved - now stupid newbie question 2!

    Ok, I poked around and noticed gcc34 was installed by CentOS - and gcc34 was able to compile and the app runs now! so stupid newbie question #1 solved!

    Thanks falko but you made the mistake of helping me and now I have stupid newbie question #2 for you!

    I followed your Perfect Server CentOS 5.1 Howto - with couple of changes. I still need to use sendmail at least temporarily as I'm migrating off sendmail from the fedora core 2 server.
    Now, centos installs sendmail 8.13 and according to the
    sendmail -d0.1 -bv root:
    Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
    MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
    NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
    TCPWRAPPERS USERDB USE_LDAP_INIT


    so sendmail seems to already have saslv2 and starttls compiled. so hopefully no need to recompile it.
    I used to use drac/dracd and qpopper to give the pop-before-smtp hack to prevent relaying but allow roaming users.
    I assume drac/dracd is no longer required with the newer sendmail, but its not at all clear how to 'turn on' the features.
    saslauthd is already on the system so apparently thats also been done by the default install.
    you give in another minihowto a whole replacement sendmail.cf file but I'm a bit worried that this might be quite a bit 'older' and that maybe
    I need to merge some selected commands into the newer version that I think I have at this point.
    any pointers on whats essential?
    also, does centos install a better pop3 server than qpopper? or should I use that still?

    your help is most welcome :)
    thanks
    cdb.
     
    Last edited: May 14, 2008
  13. falko

    falko Super Moderator Howtoforge Staff

    It'S been a few years sonce I've worked with Sendmail the last time, so I'm afraid I can't help you here. I've totally migrated to Postfix since it's so much easier to configure...


    In the tutorial I'm using Maildir, so you should install Dovecot instead of qpopper. qpopper uses mbox instead of Maildir.
     
  14. craig baker

    craig baker Member HowtoForge Supporter

    YASSNQ (yet another stupid semi-newbie question)

    I've got a compiled c app (probably) which keeps throwing warnings/errors with current glibc (running under centos 5.1).

    I'm getting the 'double free or corrupted' warning repeatedly.

    I've googled and doing
    export MALLOC_CHECK_=0 apparently turns off glibc's error checking in this case, and many of the errors (but not all) are supressed.

    alas, I dont have original source so I cant FIX the double-free problem.

    however, I have cases where app shells another app copy and THAT one apparently doesnt inherit the MALLOC_CHECK_ value - so the app winds up generating errors anyway.

    is there a GLOBAL MALLOC_CHECK_ setting?
    and if not is there a simple way to recompile the glibc library with MALLOC_CHECK_ set to be zero internally?

    I have not found a source tarball for the glibc with centos5.1.

    any help would be appreciated :)

    cdb.
     

Share This Page