Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#1460 closed defect (fixed)

Kakadu and libtool are incompatible

Reported by: warmerdam Owned by: Mateusz Łoskot
Priority: highest Milestone: 1.5.0
Component: GDAL_Raster Version: 1.4.0
Severity: normal Keywords: JP2KAK
Cc: battisti@…

Description (last modified by Mateusz Łoskot)

(Original reporter is from ACT, a sponsor)

Attempts to build Kakadu support into GDAL when using libtool cause problems like this (in this case on MacOS X):

======================== 1) GDAL + Kakadu (5.2.2) ========================

When compiling GDAL with the jp2kak driver I need to enable the "--without-libtool" configure option, otherwise I get:

ld: Undefined symbols:
__ZN10jp2_colour4initE16jp2_colour_space
__ZN10jp2_source11read_headerEv
__ZN10jp2_source14access_paletteEv
__ZN10jp2_source15access_channelsEv
__ZN10jp2_sourceC1Ev
__ZN10jp2_target12write_headerEv
__ZN10jp2_target13access_colourEv
__ZN10jp2_target14access_paletteEv
__ZN10jp2_target15access_channelsEv
__ZN10jp2_target15open_codestreamEb
__ZN10jp2_target17access_dimensionsEv
__ZN10jp2_target4openEP14jp2_family_tgt
__ZN10jp2_targetC1Ev
__ZN10jp2_targetD1Ev
__ZN11jp2_palette12get_num_lutsEv
__ZN11jp2_palette15get_num_entriesEv
__ZN11jp2_palette4initEii
__ZN11jp2_palette7get_lutEiPf
__ZN11jp2_palette7set_lutEiPiib
__ZN12jp2_channels15get_num_coloursEv
__ZN12jp2_channels18get_colour_mappingEiRiS0_S0_
__ZN12jp2_channels18set_colour_mappingEiiii
__ZN12jp2_channels19get_opacity_mappingEiRiS0_S0_
__ZN12jp2_channels19get_premult_mappingEiRiS0_S0_
__ZN12jp2_channels19set_opacity_mappingEiiii
__ZN12jp2_channels4initEi
__ZN12kdu_roi_rectC1E14kdu_codestream8kdu_dims
__ZN14jp2_dimensions4initEP10siz_paramsb
__ZN14jp2_family_src4openEP21kdu_compressed_source
__ZN14jp2_family_src4openEPKcb
__ZN14jp2_family_src5closeEv
__ZN14jp2_family_tgt4openEPKc
__ZN14jp2_family_tgt5closeEv
__ZN14jp2_output_box5closeEv
/usr/bin/libtool: internal link edit command failed

Attachments (1)

gdal-ticket-1460.patch (1.0 KB) - added by Mateusz Łoskot 12 years ago.
Small patch presenting where is the problem and proposing simple solution to discuss.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 13 years ago by warmerdam

Description: modified (diff)
Milestone: 1.5.0

comment:2 Changed 13 years ago by warmerdam

Owner: changed from warmerdam to Mateusz Łoskot
Priority: highhighest

Moving up to top priority for post 1.4.1 work as ACT is a sponsor.

comment:3 Changed 13 years ago by Mateusz Łoskot

Status: newassigned

comment:4 Changed 13 years ago by Mateusz Łoskot

Description: modified (diff)

comment:5 Changed 13 years ago by Mateusz Łoskot

Frank,

Do I need commercial version of the Kakadu SDK in order to reproduce/fix it ?

comment:6 Changed 12 years ago by Mateusz Łoskot

Keywords: JP2KAK added

Changed 12 years ago by Mateusz Łoskot

Attachment: gdal-ticket-1460.patch added

Small patch presenting where is the problem and proposing simple solution to discuss.

comment:7 Changed 12 years ago by Mateusz Łoskot

Frank,

The problem with libtool is that it ignores APPOBJ list of object files in frmts/jp2kak/GNUmakefile. I attached simple patch that solves the problem and now GDAL compiles and links with Kakadu support using both --with-libtool and --without-libtool configure options.

Could you review the proposed solution?

comment:8 Changed 12 years ago by warmerdam

Mateusz,

Generally this looks good, but could you perhaps move the object list into an includable makefile in gdal/frmts/jp2kak that can be pulled into GDALmake.opt, and the jp2kak/GNUmakefile? This would keep the list in just one place for future maintenance, and would avoid crufting up the GDALmake.opt so much.

Feel free to commit when ready.

comment:9 Changed 12 years ago by Mateusz Łoskot

Resolution: fixed
Status: assignedclosed

Fixed in the trunk (r12740) and branches/1.4 (r12741)

comment:10 Changed 12 years ago by warmerdam

There was a small error which I have corrected in r12748 (trunk) and r12750 (1.4).

Note: See TracTickets for help on using tickets.