[...]
/usr/bin/perl tools/build/parrot_config_c.pl --mini > \
src/null_config.c
src/null_config.c
gcc -o miniparrot.exe -s -L/usr/local/lib compilers/imcc/main.o \
-L/home/gbacon/src/parrot/blib/lib -lparrot -lcrypt src/null_config.o
compilers/imcc/main.o: In function `imcc_version':
/home/gbacon/src/parrot/compilers/imcc/main.c:124: undefined reference to `_Parrot_revision'
/home/gbacon/src/parrot/compilers/imcc/main.c:128: undefined reference to `_Parrot_config_revision'
compilers/imcc/main.o: In function `parseflags':
/home/gbacon/src/parrot/compilers/imcc/main.c:294: undefined reference to `_yydebug'
/home/gbacon/src/parrot/compilers/imcc/main.c:366: undefined reference to `_IMCC_fatal'
compilers/imcc/main.o: In function `do_pre_process':
/home/gbacon/src/parrot/compilers/imcc/main.c:387: undefined reference to `_IMCC_push_parser_state'
/home/gbacon/src/parrot/compilers/imcc/main.c:388: undefined reference to `_yylex'
/home/gbacon/src/parrot/compilers/imcc/main.c:402: undefined reference to `_yylex'
compilers/imcc/main.o: In function `main':
/home/gbacon/src/parrot/compilers/imcc/main.c:475: undefined reference to `_imcc_init'
/home/gbacon/src/parrot/compilers/imcc/main.c:476: undefined reference to `_IMCC_ast_init'
/home/gbacon/src/parrot/compilers/imcc/main.c:497: undefined reference to `_IMCC_fatal'
/home/gbacon/src/parrot/compilers/imcc/main.c:500: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:510: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:510: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:511: undefined reference to `_IMCC_fatal'
/home/gbacon/src/parrot/compilers/imcc/main.c:545: undefined reference to `_IMCC_fatal'
/home/gbacon/src/parrot/compilers/imcc/main.c:549: undefined reference to `_IMCC_fatal'
/home/gbacon/src/parrot/compilers/imcc/main.c:556: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:557: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:557: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:565: undefined reference to `_IMCC_fatal'
/home/gbacon/src/parrot/compilers/imcc/main.c:572: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:577: undefined reference to `_IMCC_push_parser_state'
/home/gbacon/src/parrot/compilers/imcc/main.c:580: undefined reference to `_emit_open'
/home/gbacon/src/parrot/compilers/imcc/main.c:582: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:585: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:585: undefined reference to `_IMCC_ast_compile'
/home/gbacon/src/parrot/compilers/imcc/main.c:586: undefined reference to `_imc_compile_all_units_for_ast'
/home/gbacon/src/parrot/compilers/imcc/main.c:590: undefined reference to `_yyparse'
/home/gbacon/src/parrot/compilers/imcc/main.c:592: undefined reference to `_imc_compile_all_units'
/home/gbacon/src/parrot/compilers/imcc/main.c:594: undefined reference to `_imc_cleanup'
/home/gbacon/src/parrot/compilers/imcc/main.c:596: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:598: undefined reference to `_line'
/home/gbacon/src/parrot/compilers/imcc/main.c:598: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:606: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:610: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:616: undefined reference to `_IMCC_fatal'
/home/gbacon/src/parrot/compilers/imcc/main.c:620: undefined reference to `_IMCC_fatal'
/home/gbacon/src/parrot/compilers/imcc/main.c:623: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:632: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:635: undefined reference to `_IMCC_fatal'
/home/gbacon/src/parrot/compilers/imcc/main.c:653: undefined reference to `_IMCC_info'
/home/gbacon/src/parrot/compilers/imcc/main.c:655: undefined reference to `_IMCC_info'
collect2: ld returned 1 exit status
make: *** [miniparrot.exe] Error 1
Thanks,
Jonathan
: Ugh. I'm currently doing a lot of stuff to get rid of .def files and
: replace them with decorations in the code instead. You may have got
: caught up in this (or maybe the changes have hurt cygwin in a way I
: didn't anticipate). Anyway, please grab the latest source, make
: realclean and have another go at building it. I've put in a whole load
: more changes tonight.
Not quite. At r11144 on Cygwin, I see
[...]
gcc -o miniparrot.exe -s -L/usr/local/lib compilers/imcc/main.o \
-L/home/gbacon/src/parrot/blib/lib -lparrot -lcrypt src/null_config.o
compilers/imcc/main.o: In function `imcc_version':
/home/gbacon/src/parrot/compilers/imcc/main.c:124: undefined reference to `_Parrot_revision'
/home/gbacon/src/parrot/compilers/imcc/main.c:128: undefined reference to `_Parrot_config_revision'
compilers/imcc/main.o: In function `main':
/home/gbacon/src/parrot/compilers/imcc/main.c:475: undefined reference to `_imcc_init'
/home/gbacon/src/parrot/compilers/imcc/main.c:500: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:510: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:510: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:557: undefined reference to `_yyin'
/home/gbacon/src/parrot/compilers/imcc/main.c:585: undefined reference to `_yyin'
compilers/imcc/main.o:/home/gbacon/src/parrot/compilers/imcc/main.c:596: more undefined references to `_yyin' follow
Info: resolving _yydebug by linking to __imp__yydebug (auto-import)
Info: resolving _line by linking to __imp__line (auto-import)
collect2: ld returned 1 exit status
make: *** [miniparrot.exe] Error 1
Greg
> /home/gbacon/src/parrot/compilers/imcc/main.c:500: undefined reference to
> `_yyin'
> /home/gbacon/src/parrot/compilers/imcc/main.c:510: undefined reference to
> `_yyin'
> /home/gbacon/src/parrot/compilers/imcc/main.c:510: undefined reference to
> `_yyin'
> /home/gbacon/src/parrot/compilers/imcc/main.c:557: undefined reference to
> `_yyin'
> /home/gbacon/src/parrot/compilers/imcc/main.c:585: undefined reference to
> `_yyin'
> compilers/imcc/main.o:/home/gbacon/src/parrot/compilers/imcc/main.c:596:
> more undefined references to `_yyin' follow
These however suggest that the .def file is maybe being ignored. Which
is...odd.
> Info: resolving _yydebug by linking to __imp__yydebug (auto-import)
> Info: resolving _line by linking to __imp__line (auto-import)
This is good to see.
> collect2: ld returned 1 exit status
> make: *** [miniparrot.exe] Error 1
>
I'll be cleaning up some more of this stuff later on today. Sorry about the
breakage and thanks for testing.
Jonathan
Strange, my version of cygwin links, but pops up a Windows dialog box
with the first unresolved symbol when run. Same ultimate problem
though.
Out of interest, given that cygwin can export all symbols or just
specified ones, does anyone have any strong feelings which it should
do?
It looks like it's possible to remove the sym_export/sym_import hints
to complete the build. Unless someone wants this done urgently, it
might be worth holding back so that we can see symbols that might
otherwise be missed.
Nick
A confusing bit: I stopped the stripping of libparrot.dll, and nm
seems to see the symbols that the linker's complaining about:
[...]
Compiling with:
xx.c
gcc -I./include -pipe -I/usr/local/include -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Winline -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -Winline -W -Wno-unused -Wsign-compare -Wformat-nonliteral -Wformat-security -Wpacked -Wdisabled-optimization -Wno-shadow -falign-functions=16 -DHAS_JIT -DI386 -DHAVE_COMPUTED_GOTO -I. -o xx.o -c xx.c
gcc -o miniparrot.exe -L/usr/local/lib compilers/imcc/main.o \
-L/home/gbacon/src/parrot/blib/lib -lparrot -lcrypt src/null_config.o
compilers/imcc/main.o: In function `imcc_version':
/home/gbacon/src/parrot/compilers/imcc/main.c:118: undefined reference to `_Parrot_revision'
/home/gbacon/src/parrot/compilers/imcc/main.c:122: undefined reference to `_Parrot_config_revision'
compilers/imcc/main.o: In function `main':
/home/gbacon/src/parrot/compilers/imcc/main.c:469: undefined reference to `_imcc_init'
Info: resolving _yydebug by linking to __imp__yydebug (auto-import)
Info: resolving _line by linking to __imp__line (auto-import)
collect2: ld returned 1 exit status
make: *** [miniparrot.exe] Error 1
$ nm blib/lib/libparrot.dll | egrep 'Parrot_(config_)?revision|imcc_init'
1007c7c0 T _Parrot_config_revision
1007c7b0 T _Parrot_revision
10175380 T _imcc_init
10166320 T _imcc_init_tables
Phbbbbbt!
Greg
Looks like the same problem we were having before. If we have to have
-L/usr/local/lib in there, it should probably come after your personal
-L/home/gbacon/src/parrot/blib/lib so that -lparrot prefers the one
you just built. You ran nm on a different libparrot than the one
the linker used.
Larry
Thanks,
Jonathan
: Looks like the same problem we were having before. If we have to have
: -L/usr/local/lib in there, it should probably come after your personal
: -L/home/gbacon/src/parrot/blib/lib so that -lparrot prefers the one
: you just built. You ran nm on a different libparrot than the one
: the linker used.
I doubt it. On my machine's entire filesystem, there is but one
libparrot.dll. My /usr/local/lib is empty, so that's not a source
of collisions.
How cool to elicit a reply from $Larry about lowly little Cygwin!
Larry loves the Perl-y platforms,
All the platforms of the world!
Hokey, buggy, wacked, and nice,
They are precious in his sight.
Larry loves the Perl-y platforms of the world!
I know you know the tune. :-)
Greg
Yep, I'm linking again as of r11258, but you have to -- and this has
been the case for some time -- throw in a
$ PATH=$PATH:`pwd`/blib/lib
Test summary:
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/configure/config_steps.t 1 256 70 1 1.43% 53
t/dynoplibs/myops.t 1 256 6 1 16.67% 5
t/op/trans.t 1 256 19 1 5.26% 13
t/src/compiler.t 1 256 1 1 100.00% 1
t/src/extend.t 13 3328 13 13 100.00% 1-13
t/src/intlist.t 4 1024 4 4 100.00% 1-4
t/src/io.t 9 2304 20 9 45.00% 2-4 6-7 16-19
9 tests and 721 subtests skipped.
Failed 7/227 test scripts, 96.92% okay. 30/4773 subtests failed, 99.37% okay.
Greg
There certainly seem to be a few recent events which can now trigger a
newish problem:
* The default build prefix has become /usr/local
* More people are now doing a 'make install'
* The parrot interfaces have changed in the last few weeks
* Quite a few Perl builds seems to have -L/usr/local/lib included in
their 'lddlflags'
These 4 factors seem to be mean that libparrot will sometimes reside in
/usr/local/lib, a -L/usr/local/lib is added to the link line quite early
on (e.g. with LINKFLAGS), and the problem manifests itself because the
API has changed so that linking or perhaps running parrot breaks.
The real problem is that -L/usr/local/lib is brought in from parrot, so
we have a few choices:
* Just remove -Ls brought in from 'lddflags', which seems safe to me, or
* remove the -L and add it to another config var, or
* rearrange the flags in root.in so that LINKFLAGS is after
ALL_PARROT_LIBS
Does anyone have a strong preference?
Nick
p.s. I saw a followup from Greg that he didn't have libparrot in
/usr/local/lib, but this is certainly a problem that I'm seeing
p.p.s. On cygwin, being Windows, DLLs are searched for in the path, you
need to run 'PATH=$PATH:$PWD/blib/lib' (assuming you are in the parrot
build directory). If things run without this line (or segfault) then
you're picking up the wrong DLL.
> There seem to be a few recent events which can now trigger a newish
> problem:
>
<snip>
> The real problem is that -L/usr/local/lib is brought in from parrot,
> so we have a few choices:
>
> * Just remove -Ls brought in from 'lddflags', which seems safe to
> me, or
> * remove the -L and add it to another config var, or
> * rearrange the flags in root.in so that LINKFLAGS is after
> ALL_PARROT_LIBS
I've attached two patches, one does the first, and the other the 3rd.
Both should solve the problem; so it probably comes down to aesthetics.
I prefer just removing -Ls, and if any problems are encountered,
introduce them later in linking (as with ICU).
I don't think that the same problem can occur with -Is, as CFLAGS
introduces -I./include early.
Nick
I prefer #1 over #3 as #3 would prevent any ldflags being used for the
linkage to libparrot. There is also a fourth option of simply not
pulling in 'lddflags' from Perl. This would mean setting ldflags as a
per platform hints but I think this may be the better long term option.
Thoughts?
-J
--
[As background, since my previous email didn't make it into RT, the
circumstances for this are:
* A system-wide libparrot exists (in /usr/local/lib)
* Perl provides -L/usr/local/lib with its link flags, as it does on
cygwin and gentoo Linux]
Nick
I'm tempted as a short term fix to remove the sym_import/export
(cygwin) hints. Would anyone have a problem with this?
Nick
: Even with r11320, the extend tests are failing with linkage errors on
: cygwin. I note that extend.h does not have PARROT_APIs in it. Should
: it by right? (It's possible that extend.o is linked with directly)
I'm seeing the same symptoms with r11324.
Greg
Paul
: cygwin is building as of r18821. Is this ticket required anymore?
I'm still seeing a failure in r18824:
[...]
make[1]: Entering directory `/usr/src/parrot/src/dynoplibs'
make[1]: Leaving directory `/usr/src/parrot/src/dynoplibs'
make -C compilers/past
make[1]: Entering directory `/usr/src/parrot/compilers/past'
/usr/bin/perl.exe -MExtUtils::Command -e rm_rf PAST.pbc ../../runtime/parrot/library/PAST.pbc
../../parrot.exe -o PAST.pbc --output-pbc PAST.pir
make[1]: *** [PAST.pbc] Error 53
make[1]: Leaving directory `/usr/src/parrot/compilers/past'
make: *** [compilers.dummy] Error 2
I also have to add blib/lib to the PATH.
Greg
That's helpful information as I've got the blib/lib location added to
the PATH, however, I've been able to smoke cygwin on a fairly regular
basis. There are several tickets within RT which basically say
"cygwin build fails", and I'm wondering if they're all related to the
one problem and hence could be linked to one another (I'm just trying
to do some tidying up).
Paul
1. make realclean
2. svn up
3. perl Configure.pl
4. PATH=/home/me/parrot/blib/lib:/bin
5. make
In the very few instances it still fails, I isolate the build that it
started failing and report on #parrot and it is usually fixed within a day
or two. A couple of things to point out.
1. The absolute path to blib/lib is necessary.
2. I remove everything else from the PATH but bin because exposing the path
to MinGW and/or AS Perl has been known to cause bad things to happen in the
past. Just /bin is probably a bit paranoid but that doesn't mean that the
gremlins aren't out to get me.
Cheers,
Joshua Gatcomb
a.k.a. Limbic~Region
: I build parrot on Cygwin circa 5x a week. Anytime it fails to build, I
: perform the following:
:
: 1. make realclean
: 2. svn up
: 3. perl Configure.pl
: 4. PATH=/home/me/parrot/blib/lib:/bin
: 5. make
Joy! Looks like t/stm/queue is wedged.
Thanks,
Greg