Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.4.1: LTO warnings #1604

Closed
kloczek opened this issue Apr 9, 2020 · 1 comment
Closed

3.4.1: LTO warnings #1604

kloczek opened this issue Apr 9, 2020 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Apr 9, 2020

Looks like some declarations in header files are not matching with those in .c files:

libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/10/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/10/crtbeginS.o  -Wl,--whole-archive resample/.libs/libresample.a arithmetic/.libs/libarithmetic.a colour/.libs/libcolour.a conversion/.libs/libconversion.a convolution/.libs/libconvolution.a foreign/.libs/libforeign.a freqfilt/.libs/libfreqfilt.a histogram/.libs/libhistogram.a draw/.libs/libdraw.a iofuncs/.libs/libiofuncs.a morphology/.libs/libmorphology.a mosaicing/.libs/libmosaicing.a create/.libs/libcreate.a -Wl,--no-whole-archive  -lMagickCore-7.Q16HDRI -L/usr/lib -limagequant -ltiff -ljpeg -lgthread-2.0 -lgmodule-2.0 -lexpat -lpangoft2-1.0 -lpango-1.0 -lharfbuzz -lgsf-1 -lxml2 -lfftw3 -lorc-0.4 -llcms2 -lgif -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0 -lniftiio -lznz -lpoppler-glib -lcairo -lgobject-2.0 -lglib-2.0 -lpixman-1 -lfontconfig -lfreetype -lpng16 -lxcb-shm -lxcb -lxcb-render -lXrender -lX11 -lXext -lIlmImf-2_4 -lImath-2_4 -lHalf-2_4 -lIex-2_4 -lIexMath-2_4 -lIlmThread-2_4 -lGLU -lGL -lopenslide -lcfitsio -lwebpmux -lwebpdemux -lwebp -lmatio -lhdf5 -lz -lexif -L/usr/lib/gcc/x86_64-redhat-linux/10 -L/usr/lib/gcc/x86_64-redhat-linux/10/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/10/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/10/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/10/../../../../lib64/crtn.o  -O2 -g -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -flto=auto -flto-partition=none -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -pthread -Wl,--export-dynamic -pthread   -pthread -Wl,-soname -Wl,libvips.so.42 -o .libs/libvips.so.42.12.1
mosaicing.c:98:13: warning: type of 'vips_merge_get_type' does not match original declaration [-Wlto-type-mismatch]
merge.c:66:1: note: return value type mismatch
merge.c:66:1: note: type 'GType' should match type 'int'
merge.c:66:1: note: 'vips_merge_get_type' was previously declared here
merge.c:66:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
mosaicing.c:99:13: warning: type of 'vips_mosaic_get_type' does not match original declaration [-Wlto-type-mismatch]
mosaic.c:79:1: note: return value type mismatch
mosaic.c:79:1: note: type 'GType' should match type 'int'
mosaic.c:79:1: note: 'vips_mosaic_get_type' was previously declared here
mosaic.c:79:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
mosaicing.c:100:13: warning: type of 'vips_mosaic1_get_type' does not match original declaration [-Wlto-type-mismatch]
mosaic1.c:433:1: note: return value type mismatch
mosaic1.c:433:1: note: type 'GType' should match type 'int'
mosaic1.c:433:1: note: 'vips_mosaic1_get_type' was previously declared here
mosaic1.c:433:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
mosaicing.c:101:13: warning: type of 'vips_match_get_type' does not match original declaration [-Wlto-type-mismatch]
match.c:117:1: note: return value type mismatch
match.c:117:1: note: type 'GType' should match type 'int'
match.c:117:1: note: 'vips_match_get_type' was previously declared here
match.c:117:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
mosaicing.c:102:13: warning: type of 'vips_globalbalance_get_type' does not match original declaration [-Wlto-type-mismatch]
global_balance.c:1728:1: note: return value type mismatch
global_balance.c:1728:1: note: type 'GType' should match type 'int'
global_balance.c:1728:1: note: 'vips_globalbalance_get_type' was previously declared here
global_balance.c:1728:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
morphology.c:135:13: warning: type of 'vips_morph_get_type' does not match original declaration [-Wlto-type-mismatch]
morph.c:77:1: note: return value type mismatch
morph.c:77:1: note: type 'GType' should match type 'int'
morph.c:77:1: note: 'vips_morph_get_type' was previously declared here
morph.c:77:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
morphology.c:136:13: warning: type of 'vips_rank_get_type' does not match original declaration [-Wlto-type-mismatch]
rank.c:88:1: note: return value type mismatch
rank.c:88:1: note: type 'GType' should match type 'int'
rank.c:88:1: note: 'vips_rank_get_type' was previously declared here
rank.c:88:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
morphology.c:137:13: warning: type of 'vips_countlines_get_type' does not match original declaration [-Wlto-type-mismatch]
countlines.c:72:1: note: return value type mismatch
countlines.c:72:1: note: type 'GType' should match type 'int'
countlines.c:72:1: note: 'vips_countlines_get_type' was previously declared here
countlines.c:72:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
morphology.c:138:13: warning: type of 'vips_labelregions_get_type' does not match original declaration [-Wlto-type-mismatch]
labelregions.c:57:1: note: return value type mismatch
labelregions.c:57:1: note: type 'GType' should match type 'int'
labelregions.c:57:1: note: 'vips_labelregions_get_type' was previously declared here
labelregions.c:57:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
morphology.c:139:13: warning: type of 'vips_fill_nearest_get_type' does not match original declaration [-Wlto-type-mismatch]
nearest.c:81:1: note: return value type mismatch
nearest.c:81:1: note: type 'GType' should match type 'int'
nearest.c:81:1: note: 'vips_fill_nearest_get_type' was previously declared here
nearest.c:81:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:160:13: warning: type of 'vips_conv_get_type' does not match original declaration [-Wlto-type-mismatch]
conv.c:64:1: note: return value type mismatch
conv.c:64:1: note: type 'GType' should match type 'int'
conv.c:64:1: note: 'vips_conv_get_type' was previously declared here
conv.c:64:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:161:13: warning: type of 'vips_conva_get_type' does not match original declaration [-Wlto-type-mismatch]
conva.c:205:1: note: return value type mismatch
conva.c:205:1: note: type 'GType' should match type 'int'
conva.c:205:1: note: 'vips_conva_get_type' was previously declared here
conva.c:205:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:162:13: warning: type of 'vips_convf_get_type' does not match original declaration [-Wlto-type-mismatch]
convf.c:106:1: note: return value type mismatch
convf.c:106:1: note: type 'GType' should match type 'int'
convf.c:106:1: note: 'vips_convf_get_type' was previously declared here
convf.c:106:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:163:13: warning: type of 'vips_convi_get_type' does not match original declaration [-Wlto-type-mismatch]
convi.c:183:1: note: return value type mismatch
convi.c:183:1: note: type 'GType' should match type 'int'
convi.c:183:1: note: 'vips_convi_get_type' was previously declared here
convi.c:183:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:166:13: warning: type of 'vips_compass_get_type' does not match original declaration [-Wlto-type-mismatch]
compass.c:63:1: note: return value type mismatch
compass.c:63:1: note: type 'GType' should match type 'int'
compass.c:63:1: note: 'vips_compass_get_type' was previously declared here
compass.c:63:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:164:13: warning: type of 'vips_convsep_get_type' does not match original declaration [-Wlto-type-mismatch]
convsep.c:58:1: note: return value type mismatch
convsep.c:58:1: note: type 'GType' should match type 'int'
convsep.c:58:1: note: 'vips_convsep_get_type' was previously declared here
convsep.c:58:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:165:13: warning: type of 'vips_convasep_get_type' does not match original declaration [-Wlto-type-mismatch]
convasep.c:135:1: note: return value type mismatch
convasep.c:135:1: note: type 'GType' should match type 'int'
convasep.c:135:1: note: 'vips_convasep_get_type' was previously declared here
convasep.c:135:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:167:13: warning: type of 'vips_fastcor_get_type' does not match original declaration [-Wlto-type-mismatch]
fastcor.c:72:1: note: return value type mismatch
fastcor.c:72:1: note: type 'GType' should match type 'int'
fastcor.c:72:1: note: 'vips_fastcor_get_type' was previously declared here
fastcor.c:72:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:168:13: warning: type of 'vips_spcor_get_type' does not match original declaration [-Wlto-type-mismatch]
spcor.c:97:1: note: return value type mismatch
spcor.c:97:1: note: type 'GType' should match type 'int'
spcor.c:97:1: note: 'vips_spcor_get_type' was previously declared here
spcor.c:97:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:169:13: warning: type of 'vips_sharpen_get_type' does not match original declaration [-Wlto-type-mismatch]
sharpen.c:113:1: note: return value type mismatch
sharpen.c:113:1: note: type 'GType' should match type 'int'
sharpen.c:113:1: note: 'vips_sharpen_get_type' was previously declared here
sharpen.c:113:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:170:13: warning: type of 'vips_gaussblur_get_type' does not match original declaration [-Wlto-type-mismatch]
gaussblur.c:65:1: note: return value type mismatch
gaussblur.c:65:1: note: type 'GType' should match type 'int'
gaussblur.c:65:1: note: 'vips_gaussblur_get_type' was previously declared here
gaussblur.c:65:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:171:13: warning: type of 'vips_sobel_get_type' does not match original declaration [-Wlto-type-mismatch]
sobel.c:62:1: note: return value type mismatch
sobel.c:62:1: note: type 'GType' should match type 'int'
sobel.c:62:1: note: 'vips_sobel_get_type' was previously declared here
sobel.c:62:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
convolution.c:172:13: warning: type of 'vips_canny_get_type' does not match original declaration [-Wlto-type-mismatch]
canny.c:62:1: note: return value type mismatch
canny.c:62:1: note: type 'GType' should match type 'int'
canny.c:62:1: note: 'vips_canny_get_type' was previously declared here

Without fixing that LTO during linking automatically will be disabled.

@jcupitt
Copy link
Member

jcupitt commented Apr 9, 2020

OK, fixed. Thank you!

@jcupitt jcupitt closed this as completed Apr 9, 2020
jcupitt added a commit that referenced this issue Apr 9, 2020
Some linkers complain about these type mismatches. Thanks kloczek.

See #1604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants