Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#45755 closed defect (fixed)

gdal @1.11.1: Assuming case-sensitive file-system?

Reported by: fredrik.andersson.71@… Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc: dershow, ryandesign (Ryan Carsten Schmidt), petrrr, dhoese@…, sorokine@…, wainstead (Steve Wainstead), europasice, stromnov (Andrey Stromnov)
Port: gdal

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Error: org.macports.extract for port gdal returned: error copying "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/work/gdal-1.11.1/port/cpl_port.h" to "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/work/gdal-1.11.1/port/Cpl_port.h": file already exists
Error: Failed to install gdal
Please see the log file for port gdal for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/main.log
Error: The following dependencies were not installed: gdal geos
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port postgis2 failed

Attachments (2)

main.2.log (5.9 KB) - added by dershow 9 years ago.
Clean build log
main.log (5.6 KB) - added by fredrik.andersson.71@… 9 years ago.
Just after clean

Download all attachments as: .zip

Change History (26)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: gdal added; gdal@1.11.1 removed
Summary: Assuming case-sensitive file-system in gdal@1.11.1?gdal @1.11.1: Assuming case-sensitive file-system?

Please attach the main.log.

comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Since that log contains lines that say "Skipping completed", could you "sudo port clean gdal" and then try again, and attach the new main.log?

Changed 9 years ago by dershow

Attachment: main.2.log added

Clean build log

comment:3 Changed 9 years ago by dershow

I had just run into the same problem, so I have attached a build log, just after cleaning.

comment:4 Changed 9 years ago by dershow

Cc: dersh@… added

Cc Me!

Changed 9 years ago by fredrik.andersson.71@…

Attachment: main.log added

Just after clean

comment:5 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Owner: changed from macports-tickets@… to vince@…

Ah sorry, I didn't realize gdal had just been updated today in r127765, causing this problem. This code added in that revision:

# local cpl_port.h is masked by ${prefix} one

post-extract {
    file copy ${worksrcpath}/port/cpl_port.h ${worksrcpath}/port/Cpl_port.h
    set files_to_patch [exec find ${worksrcpath} -type f -exec grep -l "cpl_port.h" \{\} \;]
    foreach file ${files_to_patch} {
        puts ${file}
        reinplace -locale C "s|cpl_port.h|Cpl_port.h|" ${file}
    }
}

post-build {
    file delete ${worksrcpath}/port/Cpl_port.h
}

is incompatible with case-insensitive filesystems.

This is also a very unusual approach for addressing this common problem. The problem is caused by -I flags in the wrong order. Ideally, fix the order of the -I flags in gdal's build system so that local directories precede system ones. Alternately, replace instances of -I${prefix}/include with -isystem${prefix}/include. It may suffice to add the single line:

configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include

See also #40656.

Vince, can you take care of this?

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 9 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:7 Changed 9 years ago by dhoese@…

Cc: dhoese@… added

Cc Me!

comment:8 Changed 9 years ago by petrrr

Cc: sorokine@… added

comment:9 Changed 9 years ago by petrrr

Adding reporter of ticket #45756, which was a duplicate of this.

comment:10 Changed 9 years ago by wainstead (Steve Wainstead)

Cc: wainstead@… added

Cc Me!

comment:11 Changed 9 years ago by europasice

Cc: gwen.barnes@… added

Cc Me!

comment:12 Changed 9 years ago by petrrr

In r127771 I temporarily removed the fix cited in comment:5, which breaks this port completely on case-insensitive filesystems.

The inclusion of the wrong version of headerfiles still needs to be addressed, but at least we are in the same situation as before.

comment:13 Changed 9 years ago by stromnov (Andrey Stromnov)

Cc: stromnov@… added

Cc Me!

comment:14 Changed 9 years ago by Veence (Vincent)

It should be fixed right now. Apologies for not thinking about those who still have a case-insensitive F.S. Please confirm it's okay so that I can close this bug.

comment:15 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Is there a reason why the more normal solution to this problem mentioned in comment:5 could not be used?

comment:16 in reply to:  14 Changed 9 years ago by sorokine@…

Replying to vince@…:

It should be fixed right now. Apologies for not thinking about those who still have a case-insensitive F.S. Please confirm it's okay so that I can close this bug.

I confirm that now compilation works and gdal installs properly.

comment:17 Changed 9 years ago by Veence (Vincent)

Yes Ryan, I know it's a kludge. My goal was that it worked as fast as possible in order to carry on with further updates. Now that I've updated almost everything that needed to be updated, I can tackle the port with less hurry and make a more savory change.

Thanks for the confirmation.

comment:18 Changed 9 years ago by Veence (Vincent)

Apparently that piece of unseemly code is not needed, the problem of ordering in the -I… options being addressed by a further line in the post-configure section. Ditched in r127822.

comment:19 Changed 9 years ago by petrrr

I guess we can close this ticket now, right?

comment:20 Changed 9 years ago by Veence (Vincent)

Resolution: fixed
Status: newclosed

Yeah, good idea. I was waiting for someone to further confirm it worked, but I guess I'll close it, and let somebody reopen it in case it goes amiss once more.

comment:21 Changed 9 years ago by petrrr

BTW: Vincent, why do you not take up maintainership of gdal? The port is pretty critical to remain unmaintained and you are doing most of the work anyway ;-)

Last edited 9 years ago by petrrr (previous) (diff)

comment:22 Changed 9 years ago by Veence (Vincent)

Good idea. But I'll still leave it open maintained because I might not be immediately available after a new release. r127824

comment:23 Changed 9 years ago by petrrr

Thanks!

comment:24 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #45793.

Note: See TracTickets for help on using tickets.