Thread: tsearch2 windows make failure

tsearch2 windows make failure

From
Andrew Dunstan
Date:
The attached log from make on tsearch2 for windows demonstrates a
failure at the dllwrap stage, presumably as a result of changes just
made to handle the relative path thing discussed yesterday. It also
illustrates some other make and compile warnings I am seeing quite
frequently, and to which I was about to turn my attention.

cheers

andrew
../../src/Makefile.shlib:327: warning: overriding commands for target `libtsearch2.a'
../../src/Makefile.shlib:262: warning: ignoring old commands for target `libtsearch2.a'
sed -e 's,MODULE_PATHNAME,$libdir/tsearch2,g' tsearch.sql.in >tsearch2.sql
cp untsearch.sql.in untsearch2.sql
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o dict_ex.o dict_ex.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o dict.o dict.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o snmap.o snmap.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o stopword.o stopword.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o common.o common.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o prs_dcfg.o prs_dcfg.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o dict_snowball.o dict_snowball.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o dict_ispell.o dict_ispell.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o dict_syn.o dict_syn.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o wparser.o wparser.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o wparser_def.o wparser_def.c 
wparser_def.c:79:1: warning: "IDIGNORE" redefined
In file included from c:/mingw/include/windows.h:55,
                 from ../../src/include/pg_config_os.h:7,
                 from ../../src/include/c.h:85,
                 from ../../src/include/postgres.h:48,
                 from wparser_def.c:9:
c:/mingw/include/winuser.h:717:1: warning: this is the location of the previous definition
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o ts_cfg.o ts_cfg.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o tsvector.o tsvector.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o rewrite.o rewrite.c 
rewrite.c:177:1: warning: "V_UNKNOWN" redefined
In file included from c:/mingw/include/ole2.h:11,
                 from c:/mingw/include/windows.h:111,
                 from ../../src/include/pg_config_os.h:7,
                 from ../../src/include/c.h:85,
                 from ../../src/include/postgres.h:48,
                 from rewrite.c:6:
c:/mingw/include/oleauto.h:65:1: warning: this is the location of the previous definition
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o crc32.o crc32.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o query.o query.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o gistidx.o gistidx.c 
In file included from gistidx.c:15:
gistidx.h:37:1: warning: "min" redefined
In file included from c:/mingw/include/windows.h:48,
                 from ../../src/include/pg_config_os.h:7,
                 from ../../src/include/c.h:85,
                 from ../../src/include/postgres.h:48,
                 from gistidx.c:1:
c:/mingw/include/windef.h:143:1: warning: this is the location of the previous definition
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o tsvector_op.o tsvector_op.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o rank.o rank.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./snowball -I./ispell
-I./wordparser-I. -I../../src/include -I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32
-I./src/include/port/win32-DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o ts_stat.o ts_stat.c 
make -C snowball SUBSYS.o
make[1]: Entering directory `/home/pgrunner/pgbuildfarm/root/HEAD/pgsql.2964/contrib/tsearch2/snowball'
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./.. -I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32" -c -o english_stem.o english_stem.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./.. -I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32" -c -o api.o api.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./.. -I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32" -c -o russian_stem.o russian_stem.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./.. -I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32" -c -o utilities.o utilities.c 
c:/mingw/mingw32/bin/ld.exe -r -o SUBSYS.o english_stem.o api.o russian_stem.o utilities.o
make[1]: Leaving directory `/home/pgrunner/pgbuildfarm/root/HEAD/pgsql.2964/contrib/tsearch2/snowball'
make -C ispell SUBSYS.o
make[1]: Entering directory `/home/pgrunner/pgbuildfarm/root/HEAD/pgsql.2964/contrib/tsearch2/ispell'
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./.. -I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32"-I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32" -c -o spell.o spell.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./.. -I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32"-I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32" -c -o regis.o regis.c 
c:/mingw/mingw32/bin/ld.exe -r -o SUBSYS.o spell.o regis.o
make[1]: Leaving directory `/home/pgrunner/pgbuildfarm/root/HEAD/pgsql.2964/contrib/tsearch2/ispell'
make -C wordparser SUBSYS.o
make[1]: Entering directory `/home/pgrunner/pgbuildfarm/root/HEAD/pgsql.2964/contrib/tsearch2/wordparser'
/mingw/bin/flex  -8 -Ptsearch2_yy -o'parser.c' parser.l
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./.. -I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32" -c -o parser.o parser.c 
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations  -I./.. -I. -I../../../src/include
-I/home/pgrunner/pgbuildfarm/root/HEAD/pgsql/src/include/port/win32-I./src/include/port/win32 -DEXEC_BACKEND
"-I../../../src/include/port/win32" -c -o deflex.o deflex.c 
c:/mingw/mingw32/bin/ld.exe -r -o SUBSYS.o parser.o deflex.o
make[1]: Leaving directory `/home/pgrunner/pgbuildfarm/root/HEAD/pgsql.2964/contrib/tsearch2/wordparser'
dlltool --export-all  --output-def tsearch2.def dict_ex.o dict.o snmap.o stopword.o common.o prs_dcfg.o dict_snowball.o
dict_ispell.odict_syn.o wparser.o wparser_def.o ts_cfg.o tsvector.o rewrite.o crc32.o query.o gistidx.o tsvector_op.o
rank.ots_stat.o snowball/SUBSYS.o ispell/SUBSYS.o wordparser/SUBSYS.o 
dllwrap  -o libtsearch2.dll --dllname libtsearch2.dll  --def tsearch2.def dict_ex.o dict.o snmap.o stopword.o common.o
prs_dcfg.odict_snowball.o dict_ispell.o dict_syn.o wparser.o wparser_def.o ts_cfg.o tsvector.o rewrite.o crc32.o
query.ogistidx.o tsvector_op.o rank.o ts_stat.o snowball/SUBSYS.o ispell/SUBSYS.o wordparser/SUBSYS.o -L../../src/port
-lm-L../../src/backend -lpostgres  
Info: resolving _my_exec_path by linking to __imp__my_exec_path (auto-import)
fu000001.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
nmth000000.o(.idata$4+0x0): undefined reference to `_nm__my_exec_path'
c:\mingw\bin\dllwrap.exe: c:\mingw\bin\gcc exited with status 1
make: *** [libtsearch2.a] Error 1

Re: tsearch2 windows make failure

From
Tom Lane
Date:
Andrew Dunstan <andrew@dunslane.net> writes:
> ../../src/Makefile.shlib:327: warning: overriding commands for target `libtsearch2.a'
> ../../src/Makefile.shlib:262: warning: ignoring old commands for target `libtsearch2.a'

Broken coding in the WIN32 parts of Makefile.shlib?  I don't see this
here.

> wparser_def.c:79:1: warning: "IDIGNORE" redefined
> rewrite.c:177:1: warning: "V_UNKNOWN" redefined

Thanks Microsoft :-(  ... guess we'll have to rename those macros.

> Info: resolving _my_exec_path by linking to __imp__my_exec_path (auto-import)
> fu000001.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
> nmth000000.o(.idata$4+0x0): undefined reference to `_nm__my_exec_path'

I was wondering whether my_exec_path might need to be marked DLLIMPORT.
Not sure about the other symbol though.
        regards, tom lane


Re: tsearch2 windows make failure

From
Andrew Dunstan
Date:

Tom Lane wrote:

>  
>
>>Info: resolving _my_exec_path by linking to __imp__my_exec_path (auto-import)
>>fu000001.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
>>nmth000000.o(.idata$4+0x0): undefined reference to `_nm__my_exec_path'
>>    
>>
>
>I was wondering whether my_exec_path might need to be marked DLLIMPORT.
>Not sure about the other symbol though.
>
>
>  
>

Is this going to be fixed? Right now tsearch2 is totally busted for 
Windows. I would fix it but my attempt (marking my_exec_path with 
DLLIMPORT) just seemed to make things worse (pgtz.c blew up).

cheers

andrew


Re: tsearch2 windows make failure

From
Tom Lane
Date:
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> I was wondering whether my_exec_path might need to be marked DLLIMPORT.
>> Not sure about the other symbol though.

> Is this going to be fixed? Right now tsearch2 is totally busted for 
> Windows. I would fix it but my attempt (marking my_exec_path with 
> DLLIMPORT) just seemed to make things worse (pgtz.c blew up).

[ shrug ... ]  *I'm* not going to fix it; I don't have a Windows setup
I could test a proposed fix on.  And evidently it does need testing.
        regards, tom lane


Re: tsearch2 windows make failure

From
Andrew Dunstan
Date:

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>  
>
>>../../src/Makefile.shlib:327: warning: overriding commands for target `libtsearch2.a'
>>../../src/Makefile.shlib:262: warning: ignoring old commands for target `libtsearch2.a'
>>    
>>
>
>Broken coding in the WIN32 parts of Makefile.shlib?  I don't see this
>here.
>
>  
>

Yes, I see that for win32 and cygwin a different ruleset is defined for 
lib$(NAME).a if enable_shared is true. On most platforms those rules 
only cover $(shlib) but for win32 and cygwin the enable_shared rules 
cover both.

Is the right fix to surround the earlier rule with conditionals so there 
isn't a rule conflict?

cheers

andrew