Bug 71113
Summary: | longstanding bug in /usr/include/expect.h | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <yarnall> |
Component: | tcltk | Assignee: | Jens Petersen <petersen> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-08-12 12:56:17 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Need Real Name
2002-08-08 21:13:53 UTC
Could you give an explicit example how to reproduce this? The following working for me: % mkdir tmp; cd tmp % cat > main.c <<EOF #include <expect.h> int main (int argc, char *argv[]) { return 0; } EOF % gcc -lexpect main.c % ./a.out % Sorry; I should have been more explicit... You need a project that includes <expect.h> in multiple files to produce multiple definitions. Also, I just did an experiment, and the C++ compiler seems to mind, whereas the C compiler doesn't. Try this instead: ----------------------------------------- (file1.cpp) #include <iostream> #include <expect.h> using namespace std; int foo(); int main() { cout << foo() << endl; } --------------------------------------------------- (file2.cpp) #include <expect.h> int foo() { return 42; } ----------------------------------------------------- % g++ -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110) % g++ -o exp file1.cpp file2.cpp -lexpect /tmp/ccs329IM.o(.bss+0x0): multiple definition of `exp_readenv' /tmp/ccNqm4kO.o(.bss+0x0): first defined here collect2: ld returned 1 exit status A followup: I found more recent versions of expect at the homepage (expect.nist.gov), which contains the same fix I use: % diff -c expect.h expect.new *** expect.h Thu Feb 28 16:16:08 2002 --- expect.new Thu Aug 8 16:48:40 2002 *************** *** 427,435 **** EXTERN int exp_console; /* redirect console */ #ifdef HAVE_SIGLONGJMP ! sigjmp_buf exp_readenv; /* for interruptable read() */ #else ! jmp_buf exp_readenv; /* for interruptable read() */ #endif /* HAVE_SIGLONGJMP */ EXTERN int exp_reading; /* whether we can longjmp or not */ --- 427,435 ---- EXTERN int exp_console; /* redirect console */ #ifdef HAVE_SIGLONGJMP ! EXTERN sigjmp_buf exp_readenv; /* for interruptable read() */ #else ! EXTERN jmp_buf exp_readenv; /* for interruptable read() */ #endif /* HAVE_SIGLONGJMP */ EXTERN int exp_reading; /* whether we can longjmp or not */ Thanks for the report. I updated expect to 5.38.0. |