# [Info] error in gettext compilation



## quux_corge (Nov 8, 2009)

Hello,

I just used csup to install ports. And I tried to compile gettext. But I get an error about an undefined symbol "old_res_ptr" at line 178.

Just a few lines before that, the declaration is wrong. It says "old_rec_ptr" instead of "old_res_ptr". Changing this line fixes the problem.

Not sure where to report that, so I'm posting it here since it may help someone somewhere.


----------



## DutchDaemon (Nov 8, 2009)

Either contact the port maintainer (ade@) or file a PR.


----------



## crsd (Nov 8, 2009)

Not sure where does old_rec_ptr come from.

```
> grep -r old_rec_ptr gettext-0.17/ | wc -l
       0
> grep -r old_res_ptr gettext-0.17/ | wc -l
      16
> grep -r old_rec_ptr /usr/ports/devel/gettext/files/ | wc -l
       0
```

Maybe you have some stale patches in ports/devel/gettext/files/?


----------



## crsd (Nov 8, 2009)

Thanks  bad habbit, almost like `cat | grep`


----------



## DutchDaemon (Nov 8, 2009)

Never mind, 'grep -rc' is a different beast ..


----------



## quux_corge (Nov 8, 2009)

My FreeBSD 8rc1 has just been installed, and I ran "csup" for the first time ever today. I'd say that I have all the latest files and patches. The error was in "localcharset.c". I cannot check where the file was right now, but I will later


----------



## DutchDaemon (Nov 8, 2009)

```
# cd /usr/ports/devel/gettext
# make distclean
===>  Cleaning for gettext-0.17_1
===>  Deleting distfiles for gettext-0.17_1
# make fetch extract
=> gettext-0.17.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/.
gettext-0.17.tar.gz                           100% of   11 MB  701 kBps 00m00s
===>  Extracting for gettext-0.17_1
=> MD5 Checksum OK for gettext-0.17.tar.gz.
=> SHA256 Checksum OK for gettext-0.17.tar.gz.
# grep -rli old_[B]rec[/B]_ptr *
# grep -rli old_[B]res[/B]_ptr *
work/gettext-0.17/gettext-runtime/intl/localcharset.c
work/gettext-0.17/gettext-runtime/gnulib-lib/localcharset.c
work/gettext-0.17/gettext-tools/libgettextpo/localcharset.c
work/gettext-0.17/gettext-tools/gnulib-lib/localcharset.c
```


----------



## quux_corge (Nov 8, 2009)

This is madness. The file I had to fix was in :
work/gettext-0.17/gettext-runtime/intl/localcharset.c

I just clean-recompiled it and got no error this time. Corrupted mirror ?

Anyways, thanks for the replies.


----------



## DutchDaemon (Nov 8, 2009)

No, a corrupted mirror would have had SHA256 and MD5 barking at you .. Are/Were the rest of your ports up to date, or did you miss some steps in /usr/ports/UPDATING along the way? Some lower-level tools like libtool can produce very weird errors.


----------



## quux_corge (Nov 8, 2009)

After installing freebsd, the first thing I did was installing ports with this command:


```
csup -L 2 -h cvsup.FreeBSD.org /usr/share/examples/cvsup/ports-supfile
```
I didn't use the update command.

I then cd-ed into "ports/graphics/sage/" and entered the "make" command. When it came to gettext, the compilation stopped with the mentioned error. It was definitely a compiler error (undefined symbol blabla). I have no idea how I ended up with a "corrupted" file.

The cpu is a ppc, but I doubt this is the source of the error.


----------

