Compiler's error

I tried to

make

the uemacs 0.4.15 from github first time as regular user then as root. I get the same error

/usr/lib/gcc/i586-suse-linux/4.5/../../../../i586-suse-linux/bin/ld: cannot find -lcurses
collect2: ld returned 1 exit status
make: *** [em] Error 1

The first human reaction is to say “you don’t have libncurses installed”. I have them installed, so no clue why it gives me this error.
Why I cloned from github? Because openSUSE 11.4 does not include uemacs (micro emacs) in its repos. I found it on 11.3 and installed it on 11.3 some while ago, but it seems that they don’t love it beginning with 11.4 (I checked and 12.1 doesn’t have it).
NB: I don’t want to use uemacs just because Linus Torvalds uses it. I need it for some stuff.

riderplus wrote:

>
> I tried to
> Code:
> --------------------
> make
> --------------------
> the uemacs 0.4.15 from github first time as regular user then as root.
> I get the same error
> Code:
> --------------------
> /usr/lib/gcc/i586-suse-linux/4.5/…/…/…/…/i586-suse-linux/bin/ld:
> cannot find -lcurses
> collect2: ld returned 1 exit status
> make: *** [em] Error 1
>
> --------------------
>
> The first human reaction is to say “you don’t have libncurses
> installed”. I have them installed, so no clue why it gives me this
> error.
> Why I cloned from github? Because openSUSE 11.4 does not include uemacs
> (micro emacs) in its repos. I found it on 11.3 and installed it on 11.3
> some while ago, but it seems that they don’t love it beginning with 11.4
> (I checked and 12.1 doesn’t have it).
> NB: I don’t want to use uemacs just because Linus Torvalds uses it. I
> need it for some stuff.
>
>

Errors like this usually mean you need the -devel RPMs for those packages,
so they can be found at link time, not just at run time.

I have ncurses devel and ncurses-utils installed.

Am 27.12.2011 16:06, schrieb riderplus:
>
> I have ncurses devel and ncurses-utils installed.
>
>
This will not help you since you get an error that -lcurses fails (not
-lncurses).
You need to find out where you can get libcurses.so or libcurses.a


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.4 |
nVidia ION | 3GB Ram

I found the solution. Pretty easy-peasy.

$su
#cd /lib
#ln -s libncurses.so.6 libcurses.so
#cd ~/uemacs
#make
#make install 
#em

That’s it. It works as a charm now.

On 2011-12-27 16:06, riderplus wrote:
>
> I have ncurses devel and ncurses-utils installed.

I think it looks for curses, not ncurses.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2011-12-27 15:26, riderplus wrote:
>
> I tried to
> Code:

Forgot to say: better ask in the programming forum here.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Better still, correct the makefile to use -lncurses. That’s a pretty old piece of software, curses has been obsolete for ages.

On 2011-12-27 16:36, riderplus wrote:
>
> I found the soluti

It comes in “termcap”


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

And to add to all the good advises above: never try to run make as root. It will not help and it will endanger your system.

It says in the instructions to make as root.

Then that’s bad advice. Usually the only step that needs to be run as root is make install.

All I can tell is that when I ran make as regular user I got plenty of warnings. When I ran it as root, none.
BUT I agree, we don’t have to generalize. I usually run make as a regular user, unless specified in program’s documentation.
Thank you hcvv and ken_yap for this tip.

On 2011-12-27 17:46, riderplus wrote:
> All I can tell is that when I ran -make- as regular user I got plenty
> of warnings. When I ran it as root, none.

That would be normal if you run some of the steps as root. Trying again as
user could fail.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)