Menu

#341 regex.h gets clobbered by Glibc's regex.h

build problems
closed-works-for-me
nobody
regexp (7)
5
2006-09-13
2006-05-17
Eitan Levi
No

I had some problems compiling Clisp 2.38 since the
build would constantly fail while trying to compile the
regexp module, complaining that a number of macros were
undefined identifiers. Some careful investigating
revealed that gcc was #including the system regex.h
file (from /usr/include) which is part of Glibc (I'm
using version 2.3.6). The Glibc version of regex.h does
not define such things as REG_TRANSLATE_TYPE, which
caused the build to explode.

Going to clisp's regexp/regex.c file and changing the
line that said #include <regex.h> to #include "regex.h"
solved the problem by having the build rely on the
local copy of the header file. Even though there *was*
a -I. option, I think GCC (I'm using version 4.0.2)
still gave /usr/include higher precedence.

Discussion

  • Jörg Höhle

    Jörg Höhle - 2006-05-19

    Logged In: YES
    user_id=377168

    Could you please investigate GCC's behaviour closer?
    -I. should take precedence -- normally.
    However, the manpage also says:
    If a standard system include directory, or a directory
    specified with -isystem, is also specified with -I, the -I
    option will be ignored.
    E.g. there's potential for misconfiguration of GCC here: -I.
    could be viewed as a system dir and ignored.

    Sadly, I haven't managed to find an option to have gcc/cpp
    dump its default include directories. These did not help:
    gcc --target-help
    gcc -print-search-dirs

     
  • Eitan Levi

    Eitan Levi - 2006-05-20

    Logged In: YES
    user_id=871542

    If that's the case, then it's likely a problem particular to
    GoboLinux... It's most likely a GCC configuartion error, as
    you mentioned, given that GoboLinux has an "unusual"
    directory hierarchy.

    Either way, I'm sorry I can't confirm what was going on
    since I've since switched to ArchLinux, on which Clisp
    builds fine.

     
  • Sam Steingold

    Sam Steingold - 2006-07-20

    Logged In: YES
    user_id=5735

    at any rate, the clisp regexp files come from gnulib verbatim
    so this bug - if indeed it is one and not a misconfiguration -
    should be reported to gnulib.

     
  • Sam Steingold

    Sam Steingold - 2006-07-20

    Logged In: YES
    user_id=5735

    This bug report is now marked as "pending"/"works for me".
    This means that we think that we cannot reproduce the problem
    and cannot do anything about it.
    Unless you - the reporter - act within 2 weeks
    (e.g., by submitting a self-contained test case),
    the bug will be permanently closed.
    Sorry about the inconvenience -
    we hope your silence means that
    you are no longer observing the problem either.

     
  • Sam Steingold

    Sam Steingold - 2006-07-20
    • status: open --> pending-works-for-me
     
  • Eitan Levi

    Eitan Levi - 2006-07-21
    • status: pending-works-for-me --> open-works-for-me
     
  • Eitan Levi

    Eitan Levi - 2006-07-21

    Logged In: YES
    user_id=871542

    This bug report is now marked as "pending"/"works for me".
    This means that we think that we cannot reproduce the problem
    and cannot do anything about it.
    Unless you - the reporter - act within 2 weeks
    (e.g., by submitting a self-contained test case),
    the bug will be permanently closed.
    Sorry about the inconvenience -
    we hope your silence means that
    you are no longer observing the problem either.

     
  • Eitan Levi

    Eitan Levi - 2006-07-21

    Logged In: YES
    user_id=871542

    I switch distros as often as most people switch desktop
    wallpapers. I like experimenting -- anyway it turns out
    GoboLinux was full of these kinds of little problems. The
    regex.h was indeed getting clobbered but I suspect the
    culprit was some weird GoboLinux configuration issue w.r.t. GCC.

    I've since tried out ArchLinux and now I'm on Ubuntu Dapper.
    CLisp works great on both ;)

     
  • Sam Steingold

    Sam Steingold - 2006-09-13
    • assigned_to: haible --> nobody
    • status: open-works-for-me --> closed-works-for-me
     

Log in to post a comment.