On 11/3/06, Jason Grossman <[EMAIL PROTECTED]> wrote:
>
> On 03/11/2006, at 11:54 am, Axel Liljencrantz wrote:
>
> >>
> >> /usr/bin/ld: Undefined symbols:
> >> _libiconv
> >> _libiconv_close
> >> _libiconv_open
> >
> > This is the problem. The linker can't find any iconv functions. Does
> > adding '-liconv' to the LDFLAGS line of the Makefile fix the problem?
>
> Yes.  Thanks!
>

Excellent. A patch is in the darcs tree that makes fish check if
-linconv is needed when configuring the build. Thanks for the help.

>
> Now I have a much more minor problem.  When fish starts, it says:
>
> > fish: 'return' command command outside of function definition
> > /usr/local/bin/seq (line 37):           return 1
> >                                               ^
> > fish: 'return' command command outside of function definition
> > /usr/local/bin/seq (line 44):           return 1
> >                                               ^
> > fish: Error while reading file /usr/local/bin/seq
>
> I can't see what the problem is with /usr/local/bin/seq.  Could you
> please post the solution, as a tutorial for us all in fishscript?
> Thanks.

Sure. The problem is twofold.

The problem that fish is complaining about is that the seq script is
trying to use the builtin 'return', while not inside of a function.
'return' in fish works much like in python and C-like languages, i.e.
it exits the currently running function. When I wrote the seq code, I
wrote it as a function, but after a while I decided it would be better
to use it as a plain old script file, that way you could use seq from
outside fish. A script file is not a function, so the 'return' builtin
does not make sense any more, which is why fish is complaining. All
places where fish calls 'return' should be changed to 'exit'.

That is the first half of the problem. The second part is that this
bug was actually reported and fixed several months ago. The 'seq'
script shipped with fish hasn't had this bug for a long time. You've
been running a fish version with this problem, you just haven't
noticed it before since the call to 'return' is in a rarely used
branch of the code, and the old code validator wasn't good enough to
spot the bug ahead of time. The validator in fish 1.22.0 is a bit more
through, and it can spot this problem ahead of time, and will complain
about it. But if the bug was fixed, why is it still there?

You are most probably still seeing this bug because when you upgraded
from the initial broken fish version to the one after that, you forgot
to do a 'make uninstall' of the old fish version. During the fish
build process, fish checks if a 'seq' command is installed, and if it
isn't, fish installs it's own. The old, broken version has been
blocking the inclusion of a fixed version! I'm afraid I don't see an
correct way out of that problem. The best I can do is to make a
buildtime check if the seq command seems to be one shipped with fish,
and if so update it. But this is a somewhat fragile fix.

>
> Jason
>

-- 
Axel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to