# misc/mc 4.8.10 upgrade error



## freethread (Oct 27, 2013)

As the title, upgrading the misc/mc port from version 4.8.8 to 4.8.10 give error. Yesterday I sent an e-mail to port maintainer then waiting for a cure, anyhow looking at the error it seems to me that it's not hard to fix it, so I thrown an eye into the source directories to see where the error could be located but I have no idea on where could it be.

The error is in the configuration stage, the process cannot find ncurses header file, it seems it looking for headers in <include_path>/ncurses/ncurses.h instead of <include_path>/ncurses.h.

Perhaps I can fix it if I create the directory <include_path>/ncurses and create a symlink to the header there, but I it's not a good idea. I'm sure I will forget to delete it when finished.

Anyone here use mc and faced to same error?


----------



## mpeterma (Oct 30, 2013)

Yes, the same for me...


```
===>  Configuring for mc-4.8.10
configure: error: invalid feature name: configdir=/usr/local/etc
===>  Script "configure" failed unexpectedly.
Please report the problem to fjoe@FreeBSD.org [maintainer] and attach the
"/usr/ports/misc/mc/work/mc-4.8.10/config.log" including the output of the
failure of your make command. Also, it might be a good idea to provide an
overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** [do-configure] Error code 1

Stop in /usr/ports/misc/mc.
root@buildbox:/usr/ports/misc/mc #
```


----------



## castor (Oct 31, 2013)

mpeterma said:
			
		

> Yes, the same for me...


Which version of FreeBSD do you use? Because I have the same issue with 8.4 but installation works flawlessly on 9.2-RELEASE.


----------



## stetus (Oct 31, 2013)

Doesn't work on 9.2-RELEASE.


----------



## freethread (Oct 31, 2013)

castor said:
			
		

> Which version of FreeBSD do you use? Because I have the same issue with 8.4 but installation works flawlessly on 9.2-RELEASE.



I installed it (with the same error) on a 9.2-RELEASE-p1 amd64 real machine and on a 9.2-RELEASE-p1 amd64 in virtual machine. I'm not sure if it builds with success if devel/ncurses is installed, I don't have.


----------



## castor (Nov 1, 2013)

freethread said:
			
		

> I installed it (with the same error) on a 9.2-RELEASE-p1 amd64 real machine and on a 9.2-RELEASE-p1 amd64 in virtual machine. I'm not sure if it builds with success if devel/ncurses is installed, I don't have.


I'm sure that problem that mpeterma and me have faced is differrent from yours. In `make config` I have not checked the NCURSES option, left it with S-LANG. And `make config` crashing in very first seconds with 

```
configure: error: invalid feature name: configdir=/usr/local/etc
```
In addition: installation with S-LANG instead of NCURSES have just succeded on my third server with 9.2-RELEASE.


----------



## freethread (Nov 1, 2013)

castor said:
			
		

> I'm sure that problem that mpeterma and me have faced is differrent from yours. In `make config` I have not checked the NCURSES option, left it with S-LANG. And `make config` crashing in very first seconds with
> 
> ```
> configure: error: invalid feature name: configdir=/usr/local/etc
> ...



Yes, the error is related to ncurses and it happens in configure stage (autoconf/automake), which I don't know how it works and where start to find a solution.


```
checking for ar... (cached) ar
checking for CHECK... yes
checking for GLIB... yes
checking for GMODULE... yes
[color="Red"]checking for ncurses/ncurses.h and ncurses/term.h... no
configure: error: ncurses header not found[/color]
===>  Script "configure" failed unexpectedly.
Please report the problem to fjoe@FreeBSD.org [maintainer] and attach the
"/usr/ports/misc/mc/work/mc-4.8.10/config.log" including the output of the
failure of your make command. Also, it might be a good idea to provide an
overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** [do-configure] Error code 1

Stop in /usr/ports/misc/mc.
*** [build] Error code 1

Stop in /usr/ports/misc/mc.
```

ncurses library is part of the FreeBSD base system: /usr/include/ncurses.h and /usr/lib/libncurses*.(a|so). The library is at version 5.7, while in ports there is the last version (5.9) devel/ncurses.

I guess the port version installs headers in /usr/local/include/ncurses directory, so there is a wrong reference in autoconf/automake building system, I look into .ac file but found nothing wrong there, but I never used autoconf/automake to build a C/C++ project, probably the error was in front of my eyes but I didn't see it.


----------



## cpm@ (Nov 1, 2013)

I suggest to follow this PR which currently it's open.


----------



## freethread (Nov 1, 2013)

cpm said:
			
		

> I suggest to follow this PR which currently it's open.



Thank you for the PR link. In that PR there's a link to another one PR183170, to fix the error the port devel/ncurses should be installed. This is not acceptable for me, I installed that port few years ago, the screen turned on b/w and never found an how-to/article/suggestion about how to have it working properly. So I keep mc at current version.

Thank you all for help me find a solution.


----------



## ggallo (Nov 3, 2013)

*Possible solution for misc/mc update*

Hi All!

This is my first post, I wish I do it properly:

I managed this problem with symlinking the missing headers to a place where make looking for. Those header files included in the base sytem, but misc/mc install/make script looking for those at wrong places.

`mkdir /usr/local/include/ncurses`
`ln -s /usr/include/ncurses.h /usr/local/include/ncurses`
`ln- s /usr/include/term.h /usr/local/include/ncurses`

After this "hack", misc/mc builds and installs fine (as of version 4.8.10)

I tested this on 9.2-RELEASE, I think older installs will work this way.


----------



## freethread (Nov 3, 2013)

ggallo said:
			
		

> Hi All!
> 
> This is my first post, I wish I do it properly:
> 
> ...



Thank you for this workaround, I will end to adopt it. Anyhow I will give devel/ncurses another chance when I will get spare time (in VM).


----------



## freethread (Nov 5, 2013)

An update to this... thing.

I installed devel/ncurses then upgraded misc/mc, it seems the ncurses port now works, I only checked the 256 color features in port options. But...

Currently my environment configuration has


```
NCURSES_NO_UTF8_ACS=1
```

I tested without the above variable set and with the above set with 0 (zero) and it works like the system ncurses library, so with it set to 1 I get the following results.

*mc in KDE Konsole*







*mc in Windows PuTTY*





However, the mc skin is custom, I also tried the default skin with same result. Viewing an UTF-8 text file containing line drowing characters, they are displayed well. This is not a real problem, I can start mc with -a option.

There are others long time bug still presents: some options not written to (or not red ftom?) ini file: menu 'Options|verbose operartions', menu 'Options|Display bits|Input/display codepage'. I don't know if this happens in FreeBSD only or if a mc native bugs.

*Viewing UTF-8 text file in mcview*


----------

