Error when compiling devel/gettext in jail

I fail to upgrade devel/gettext in all jails, while it succeeds on the host.

Code:
./localename.c: In function '_nl_locale_name_thread_unsafe':
./localename.c:2607: error: 'locale_t' undeclared (first use in this function)
./localename.c:2607: error: (Each undeclared identifier is reported only once
./localename.c:2607: error: for each function it appears in.)
./localename.c:2607: error: expected ';' before 'thread_locale'
./localename.c:2608: error: 'thread_locale' undeclared (first use in this function)
./localename.c:2608: error: 'LC_GLOBAL_LOCALE' undeclared (first use in this function)
*** Error code 1

Stop in /var/ports/basejail/usr/ports/devel/gettext/work/gettext-0.18.1.1/gettext-runtime/intl.
*** Error code 1

Stop in /var/ports/basejail/usr/ports/devel/gettext/work/gettext-0.18.1.1/gettext-runtime.
*** Error code 1

Stop in /var/ports/basejail/usr/ports/devel/gettext/work/gettext-0.18.1.1/gettext-runtime.
*** Error code 1

Stop in /var/ports/basejail/usr/ports/devel/gettext/work/gettext-0.18.1.1.
*** Error code 1

Stop in /basejail/usr/ports/devel/gettext.

===>>> make failed for devel/gettext
===>>> Aborting update

===>>> Update for devel/gettext failed
===>>> Aborting update

Terminated
===>>> The following actions were performed:
        Upgrade of libiconv-1.14 to libiconv-1.14_1


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> devel/gettext

I'm using sysutils/ezjail, but I'm probably doing something wrong there. After upgrading the host to FreeBSD 9.1-RELEASE, I ran ezjail-admin update -u and that's probably not enough. Something must be wrong with the basejail.

But what?
 
Read /usr/ports/UPDATING:
Code:
20130316:
  AFFECTS: users of converters/libiconv and devel/gettext
  AUTHOR: bapt@FreeBSD.org

  libiconv now handles the lib/charset.alias file instead of devel/gettext.
  If you are using pkgng 'and' upgrading from source with portupgrade or
  portmaster, first delete gettext, upgrade libiconv, then reinstall gettext.

  # pkg delete -f devel/gettext
  # portmaster converters/libiconv devel/gettext
    or
  # pkg delete -f devel/gettext
  # portupgrade converters/libiconv devel/gettext
 
I already learned (the hard way) about the importance of /usr/ports/UPDATING, so I followed the instructions. You can see that converters/libiconv was successfully upgraded.

Code:
===>>> The following actions were performed:
        Upgrade of libiconv-1.14 to libiconv-1.14_1

Also, the same method worked on the host. I get the same compile error in all jails.
 
I found a solution, but I'm not sure if it's the right way.

Usually, I update the basejail with
Code:
# ezjail-admin update -u
This time, I had to update by running
Code:
# ezjail-admin -i

After that devel/gettext can be compiled, but I'm entirely unsure about this method. Is there something I'm missing here? Like running mergemaster?
 
I have the same issue in jails and have no issue on host. Can anybody help us? Looks like something goes wrong after updating the jails from 9.0-RELEASE to 9.1-RELEASE.

My upgrade method was:
[cmd=]# ezjail-admin update -U -s 9.0-RELEASE[/cmd]
[cmd=]# mergemaster in every jail[/cmd]

Rebuilt all packages in every jail.

Whats is going wrong?

I can't update glib-2.28.8_5 in jails either. Please see PR PR 177069.
 
serverhamster said:
Usually, I update the basejail with
Code:
# ezjail-admin update -u

You probably want to do: ezjail-admin update -up

The -p updates the ports tree in the jails as well, via portsnap.
 
I'm having that same problem with my jails and the host itself, so it seems I could have messed it up with my 9.0 to 9.1 upgrade as @konstantin says. I'm figuring what to do around freebsd-update.
 
Last edited by a moderator:
So, is there a way to force [cmd=]ezjail-admin update -u[/cmd] without it telling you
Code:
freebsd-update: Cannot upgrade from 9.1-RELEASE to itself
Or, can the basejail be reinstalled somehow?
 
Well, [cmd=]freebsd-update IDS[/cmd] complains on half the userland for me and don't want to buildworld/kernel to -STABLE or -RELEASE.

I don't see any other option than just store my configurations and do a clean install with the DVD.
 
I have the same issue as you, but not on all jails. Some jails compile gettext just fine, some give the same error. But I have the same issue on the host, and on one other server that has no jails. I don't think it's really jail related. I've tried recompiling everything, but I can't get rid of the error. Removing gettext and reinstalling does not work either.
 
Today I just did some "knife in mouth" stuff without luck at all. Yeah, I know I was just asking for trouble but maybe it can add more pointers to the problem.

I faked the $RELNUM variable on freebsd-update to 9.0-RELEASE then did # freebsd-update upgrade -r 9.1-RELEASE and # freebsd-update install.

It overwrote the new files, merged the configurations and everything. I rebooted, reverted the freebsd-update script to its original state and did # freebsd-update fetch and # freebsd-update install again to hit 9.1-RELEASE-p1.

After that I tried to compile devel/gettext and failed again. Funnily I also compared the output of # freebsd-update IDS with my previous saved one and both were identical.
 
Nothing out of the ordinary. I also usually compile ports without NLS.
Code:
lang=
lc_ctype="c"
lc_collate="c"
lc_time="c"
lc_numeric="c"
lc_monetary="c"
lc_messages="c"
lc_all=

Is this a bad idea?
 
Crash after # make clean && make on /usr/ports/devel/gettext
Code:
./localename.c  -fPIC -DPIC -o .libs/localename.o
./localename.c: In function '_nl_locale_name_thread_unsafe':
./localename.c:2607: error: 'locale_t' undeclared (first use in this function)
./localename.c:2607: error: (Each undeclared identifier is reported only once
./localename.c:2607: error: for each function it appears in.)
./localename.c:2607: error: expected ';' before 'thread_locale'
./localename.c:2608: error: 'thread_locale' undeclared (first use in this function)
./localename.c:2608: error: 'LC_GLOBAL_LOCALE' undeclared (first use in this function)
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.18.1.1/gettext-runtime/intl.
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.18.1.1/gettext-runtime.
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.18.1.1/gettext-runtime.
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.18.1.1.
*** Error code 1

Stop in /usr/ports/devel/gettext.
# locale
Code:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
/etc/make.conf
Code:
PKG_OPTIONS.postfix+=sqlite
NO_X="YES"
NO_X11="YES"
WITHOUT_X11="YES"
WITHOUT_GUI="YES"
WITHOUT_TK="YES"
ENABLE_GUI="NO"
# added by use.perl 2013-03-28 16:53:40
PERL_VERSION=5.14.2
# uname -a
Code:
FreeBSD zaibach.dyndns.org 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

I have the same error on the host and the jails. I'll end checksuming all the involved headers on a clean install against mine.
 
Thanks to @AllanJud, I finally was able to install Gettext again. He referred to http://blog.pcbsd.org/2013/04/pc-bs...epository-for-pc-bsd-and-freebsd-9-1-release/

Since I could not compile Gettext anymore (same error as the authors) I wanted to install it with PKGNG. I added the following settings to my pkgng.conf, as mentioned here http://wiki.pcbsd.org/index.php/Turn_FreeBSD_into_PC-BSD® , to make use of the PC-BSD PKGNG repo:
Code:
#edit /usr/local/etc/pkgng.conff
packagesite: [url]ftp://mirrors.isc.org/pub/pcbsd/packages/9.1-RELEASE/amd64/[/url]
PUBKEY: /usr/local/etc/pkg-pubkey.cert
PKG_CACHEDIR: /usr/local/tmp
Next I downloaded the keyfile and copied it to /usr/local/etc/pkg-pubkey.cert

Then I typed [cmd=]pkg install gettext[/cmd] which resulted in
Code:
Installing gettext-0.18.1.1_1... done

I did compile packages before that, which worked fine all time. I don't understand why I can't compile Gettext anymore all of a sudden. I hope it will be fixed soon.
 
Last edited by a moderator:
That's very odd, I can compile devel/gettext just fine in a jail but then again I'm using ports-mgmt/poudrire-devel that guarantees a clean starting point for every port compilation. This is most likely related to the port using old headers from /usr/local/include instead of using the headers from the work directory as it should.
 
I'm building from ports and not using any jails. I too am having this problem and following UPDATING doesn't help. Nothing seems to be working.
 
I fixed it for me the hard way forcing ezjail to reinstall the basejail from base.txz, after that I was able to compile in a jail.

Regarding the host itself I overwrote the files that # freebsd-update IDS was complaining about using the same basejail as a source.
 
How did you force a reinstallation of the basejail? If I do ezjail-admin update -U -s 9.1-RELEASE, I get
Code:
freebsd-update: Cannot upgrade from 9.1-RELEASE to itself
 
Back
Top