libcurses problem
Posted in 2004
Neil Truby couldn't compile 4GL programs with Informix 5.20 on SuSE: the linker reported "cannot find -lcurses" even though ncurses and ncurses-devel RPMs were installed (the mktemp warning was harmless). Suggestions included swapping -lcurses for -lncurses, adding -L paths, and the known libncurses.so.5/so.4 symlink trick. Inspecting /usr/lib showed a tangle of broken/mismatched symlinks (only libncursesw present, libcurses.so dangling). Resolved: he reinstalled the ncurses package cleanly, then symlinked libncurses to libcurses to satisfy 4GL.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL
I'm really stuck :-( Running Informix 5.20 on SuSE Server 8. When I try to compile a 4gl program I get: informix@dell:/exports/andy> c4gl test.4gl /opt/informix/5.20/lib/esql/libifos.so: the use of `mktemp' is dangerous, better use `mkstemp' /usr/lib/gcc-lib/i486-suse-linux/3.2.2/../../../../i486-suse-linux/bin/ld: cannot find -lcurses collect2: ld returned 1 exit status But the ncurses and ncurses-devel packages *are* installed, as you can see :-(( informix@dell:/exports/andy> rpm -aq | grep curses ncurses-5.2-402 yast2-ncurses-2.6.24-142 ncurses-devel-5.2-402 Any inspiration gratefully received. Even abuse at this stage. thanks Neil
Neil Truby wrote: > I'm really stuck :-( > Running Informix 5.20 on SuSE Server 8. > > When I try to compile a 4gl program I get: > > informix@dell:/exports/andy> c4gl test.4gl > /opt/informix/5.20/lib/esql/libifos.so: the use of `mktemp' is > dangerous, better use `mkstemp' > /usr/lib/gcc-lib/i486-suse-linux/3.2.2/../../../../i486-suse- > linux/bin/ld: cannot find -lcurses > collect2: ld returned 1 exit status ignore the warning. Find the part of the script that brings on curses (ie -lcurses) and replace with -lncurses. See what happens. Curses and ncurses are different libraries. This is suse? I'm surprised that ifx is calling on curses - i didn't know it existed on linux. If you can find an RPM of curses then install it.
Neil Truby wrote: > I'm really stuck :-( > Running Informix 5.20 on SuSE Server 8. > > When I try to compile a 4gl program I get: > > informix@dell:/exports/andy> c4gl test.4gl > /opt/informix/5.20/lib/esql/libifos.so: the use of `mktemp' is dangerous, > better use `mkstemp' > /usr/lib/gcc-lib/i486-suse-linux/3.2.2/../../../../i486-suse-linux/bin/ld: > cannot find -lcurses > collect2: ld returned 1 exit status > > But the ncurses and ncurses-devel packages *are* installed, as you can see > :-(( > > informix@dell:/exports/andy> rpm -aq | grep curses > ncurses-5.2-402 > yast2-ncurses-2.6.24-142 > ncurses-devel-5.2-402 > > Any inspiration gratefully received. > Even abuse at this stage. > > thanks > Neil > > I don't know if this will help, but some time ago there was a discussion about ncurses and ncurses4 (previous version). Google for that. I have RDS/IDS running on Suse 9.0 with only small glitches. I have not tried Compiler. HTH Michael
"Andrew Hamm" <ahamm@mail.com> wrote in message news:2in24iFoqgt5U1@uni-berlin.de... > Neil Truby wrote: > > I'm really stuck :-( > > Running Informix 5.20 on SuSE Server 8. > > > > When I try to compile a 4gl program I get: > > > > informix@dell:/exports/andy> c4gl test.4gl > > /opt/informix/5.20/lib/esql/libifos.so: the use of `mktemp' is > > dangerous, better use `mkstemp' > > /usr/lib/gcc-lib/i486-suse-linux/3.2.2/../../../../i486-suse- > > linux/bin/ld: cannot find -lcurses > > collect2: ld returned 1 exit status > > ignore the warning. > > Find the part of the script that brings on curses (ie -lcurses) and replace > with -lncurses. See what happens. Curses and ncurses are different > libraries. Already tried it. Same error - except it can't find -lncurses of course. This is suse? Yup. Same on Standard Server 8 or 9.0 > If you can find an RPM of curses then install it. I'd like to know from where. Do you think i'm asking the right SuSE group? I've never had a question answered on alt.os.linux.suse. Perhaps there's a better one? cheers Neil
"Michael Krzepkowski" <mkrzepkowski@hotmail.com> wrote in message news:NDtxc.712920$oR5.335412@pd7tw3no... > Neil Truby wrote: > > I'm really stuck :-( > > Running Informix 5.20 on SuSE Server 8. > > > I don't know if this will help, but some time ago there > was a discussion about ncurses and ncurses4 (previous version). > Google for that. Yes, thanks. it was to link libncurses.so.5 to libncurses.so.4. But it hasn't worked in this case.
The Suse 9 c/w SE7/4gl7/ISQL7 worked out of the box once ncurses was installed, are you sure the library paths are correct? Cheers Paul Neil Truby wrote: > > "Michael Krzepkowski" <mkrzepkowski@hotmail.com> wrote in message > news:NDtxc.712920$oR5.335412@pd7tw3no... > > Neil Truby wrote: > > > I'm really stuck :-( > > > Running Informix 5.20 on SuSE Server 8. > > > > > I don't know if this will help, but some time ago there > > was a discussion about ncurses and ncurses4 (previous version). > > Google for that. > > Yes, thanks. it was to link libncurses.so.5 to libncurses.so.4. But it > hasn't worked in this case. -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #
Neil Truby wrote: > >> If you can find an RPM of curses then install it. > > I'd like to know from where. Do you think i'm asking the right SuSE > group? I've never had a question answered on alt.os.linux.suse. > Perhaps there's a better one? Ooo err - don't know on either count. Being a C hacker from way back, I'd be inclined to search out the source of the old warhorse and build it me'self. As for SuSE or Linux groups, i really don't know much about em *mutters something about UNIX is UNIX*. What about searching the GNU C site for libraries? I'd wager that if you found a copy of curses for any Linux, it'll probably fit into SuSE. I have a vague undifferentiated gut feeling that I've seen this sort of thing on HPs and Linuxii before, and it sort-of comes down to using the wrong version of SOMETHING which contains an embedded reference to curses instead of ncurses. Perhaps by picking it for the wrong platform, or using the wrong C compiler/linker, or SOMEthing of that nature. Sorry I can't make more sense. Has Jonathan weighed in on this? Surely he'd have some clue.
"Richard Harnden" <richard.harnden@lineone.net> wrote in message
news:40c6e434$0$6329$65c69314@mercury.nildram.net...
> Neil Truby wrote:
>
> > "Michael Krzepkowski" <mkrzepkowski@hotmail.com> wrote in message
> > news:NDtxc.712920$oR5.335412@pd7tw3no...
> >
> >>Neil Truby wrote:
> >>
> >>>I'm really stuck :-(
> >>>Running Informix 5.20 on SuSE Server 8.
> >>>
> Do you have a link from libncurses.so to libncurses.so.5 ?
dell:~ # env | grep LD
LD_LIBRARY_PATH=/lib:/usr/lib:/opt/informix/5.20/lib:/opt/informix/5.20/lib/esql
dell:~ # cd /lib
dell:/lib # ll libcurses*
ls: libcurses*: No such file or directory
dell:/lib # cd /usr/lib
dell:/usr/lib # ll libcurses*
lrwxrwxrwx 1 root root 17 Jun 8 13:22 libcurses.so ->
libncurses.so.5.2
dell:/usr/lib # ll libncurses*
-rwxr-xr-x 1 root root 410814 Oct 16 2002 libncurses++.a
-rwxr-xr-x 1 root root 413462 Oct 16 2002 libncurses++w.a
-rw-r--r-- 1 root root 6125382 Oct 16 2002 libncurses.a
lrwxrwxrwx 1 root root 15 Jun 8 23:29 libncurses.so ->
libncurses.so.4
-rwxr-xr-x 1 root root 226551 Jul 22 2003 libncurses.so.1.9.7a
lrwxrwxrwx 1 root root 20 Jun 4 17:03 libncurses.so.2.1 ->
libncurses.so.1.9.7a
lrwxrwxrwx 1 root root 17 Jun 8 14:04 libncurses.so.4 ->
libncurses.so.4.2
-rwxr-xr-x 1 root root 298638 Jul 22 2003 libncurses.so.4.2
lrwxrwxrwx 1 root root 15 Jun 8 14:09 libncurses.so.5 ->
libncurses.so.4
lrwxrwxrwx 1 root root 16 Jun 4 17:22 libncursesw.so ->
libncursesw.so.5
lrwxrwxrwx 1 root root 18 Jun 4 17:02 libncursesw.so.5 ->
libncursesw.so.5.2
-rwxr-xr-x 1 root root 337823 Oct 16 2002 libncursesw.so.5.2
dell:/usr/lib #
> If libcurses.so is installed somewhere other than /usr/lib, have you
> tried adding -L/some/other/path before the -lncurses ?
It isn't I don't think.
cheers
Neil
Neil Truby wrote: > "Michael Krzepkowski" <mkrzepkowski@hotmail.com> wrote in message > news:NDtxc.712920$oR5.335412@pd7tw3no... > >>Neil Truby wrote: >> >>>I'm really stuck :-( >>>Running Informix 5.20 on SuSE Server 8. >>> >> >>I don't know if this will help, but some time ago there >>was a discussion about ncurses and ncurses4 (previous version). >>Google for that. > > > Yes, thanks. it was to link libncurses.so.5 to libncurses.so.4. But it > hasn't worked in this case. > > Do you have a link from libncurses.so to libncurses.so.5 ? If libcurses.so is installed somewhere other than /usr/lib, have you tried adding -L/some/other/path before the -lncurses ? -- rh
Neil Truby wrote: > "Richard Harnden" <richard.harnden@lineone.net> wrote in message > news:40c6e434$0$6329$65c69314@mercury.nildram.net... [snip] > dell:/lib # cd /usr/lib > dell:/usr/lib # ll libcurses* > lrwxrwxrwx 1 root root 17 Jun 8 13:22 libcurses.so -> > libncurses.so.5.2 Okay, but ... > dell:/usr/lib # ll libncurses* > -rwxr-xr-x 1 root root 337823 Oct 16 2002 libncursesw.so.5.2 Here's you problem, you have a libncurses*w* but no libncurses. ie, libcurses.so doesn't point to anywhere. I'm not sure what libncursesw is ... wide-chars, maybe ? Are you sure you installed the correct libncurses rpm ? You could always point libcurses.so to libncurses.so.4.2 or rename libncursesw. -- rh
Thanks to Richard, Andreas, Marco and others, all of whom pointed out various symptoms that I'd hosed up the libncurses package somehow or other. A complete re-installation did the trick. Then, as Marco told me back in March, link libncurses to libcurses to make 4GL happy. regards -- Neil Truby t:01932 724027 Director m:07798 811708 Ardenta Limited e:neil.truby@ardenta.com