Opened 9 years ago
Closed 8 years ago
#48677 closed defect (fixed)
kealib @1.4.2.20140825_2: CMake Error: The source directory does not appear to contain CMakeLists.txt
Reported by: | bmayer@… | Owned by: | Veence (Vincent) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | haspatch | Cc: | larryv (Lawrence Velázquez), ryandesign (Ryan Carsten Schmidt), kurthindenburg (Kurt Hindenburg) |
Port: | kealib |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
sudo port install kealib ---> Computing dependencies for kealib ---> Configuring kealib Error: org.macports.configure for port kealib returned: configure failure: command execution failed Please see the log file for port kealib for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_kealib/kealib/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port kealib failed Benjamins-MBP:106GOPRO bmayer$ sudo port clean kealib ---> Cleaning kealib Benjamins-MBP:106GOPRO bmayer$ sudo port install RSGISLib libgeotiff ---> Computing dependencies for rsgislib ---> Dependencies to be installed: kealib muparser xercesc3 ---> Fetching archive for kealib ---> Attempting to fetch kealib-1.4.2.20140825_2.darwin_14.x86_64.tbz2 from http://packages.macports.org/kealib ---> Attempting to fetch kealib-1.4.2.20140825_2.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/kealib ---> Attempting to fetch kealib-1.4.2.20140825_2.darwin_14.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/kealib ---> Fetching distfiles for kealib ---> Verifying checksums for kealib ---> Extracting kealib ---> Configuring kealib Error: org.macports.configure for port kealib returned: configure failure: command execution failed Error: Failed to install kealib Please see the log file for port kealib for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_kealib/kealib/main.log Error: The following dependencies were not installed: kealib muparser xercesc3 To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port RSGISLib failed
Attachments (3)
Change History (13)
Changed 9 years ago by bmayer@…
comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to vince@… |
Port: | kealib added |
Summary: | Issue with installing kealib → kealib @1.4.2.20140825_2: CMake Error: The source directory does not appear to contain CMakeLists.txt |
Confirmed.
comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | larryv@… ryandesign@… added |
---|
I think this is a bug in the cmake portgroup. When not using out-of-source builds (see #33259), it assumes the build directory is ${worksrcpath}. Shouldn't it instead use ${configure.dir} (which this port correctly sets)?
A workaround for this problem is for the kealib port to adopt out-of-source builds, which it should of course do (see #47197). However, the bug in the cmake portgroup should also be fixed.
comment:3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Upon further investigation, I see that the portgroup also uses ${worksrcpath} as the default configure.post_args. So the portgroup really wants worksrcpath to be the source directory—the one containing CMakeLists.txt. MacPorts doesn't have a variable that means "the directory that actually contains the source code" (worksrcpath is meant to mean that, but really just means the top level directory that was extracted) so we may have to change the port to match the portgroup's expectation. It has been months since this change was made in the portgroup, so there must not be that many ports affected by this problem, so it's not too awful to have to change these few ports.
There are probably other ports that set configure.dir and build.dir instead of setting worksrcpath; I remember doing this in quite a few ports (though I don't remember if they also use the cmake portgroup). There are times when it is advantageous for worksrcpath to remain pointing to the top level directory, while setting configure.dir and build.dir to a subdirectory. Using kealib as an example, its top level directory contains "README.md" and "trunk". "trunk" is the directory that contains the source code, but if we set worksrcpath to ${worksrcpath}/trunk, that would also become the default patch.dir which would prevent us from being able to apply a patch to README.md, which is something we might want to do (if not in this port, then in other ports). (Patchfiles used to be able to specify that the file to be patched is in a parent directory, but the version of the patch command included with OS X 10.6.8 and later prohibits this; see #30034 for an example of this problem.) However, a workaround for that would be to set patch.dir back to the top level directory. So, although I thought this was a problem when I started writing this paragraph, I guess it actually isn't.
comment:4 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
The problem is that fetch.types git and hg (which this port uses) are broken when worksrcdir is changed; see #29093, which includes a patch that I didn't yet look at...
Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | kealib.diff added |
---|
Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | patch-gdal-CMakeLists.txt.diff added |
---|
comment:5 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|
The attached patch fixes the problem by updating kealib to version 1.4.4, using the official distfile instead of fetching from hg, and then changing worksrcdir to match the cmake portgroup's new expectations.
I also changed the pre-configure reinplace to a patchfile, and changed the pre-install ui_msg to notes, since that's how we prefer to handle those situations.
I also removed -DCMAKE_VERBOSE_MAKEFILE=ON
from configure.args because the cmake portgroup already does that for you.
An out of source build did not work, so I set cmake.out_of_source no
to satisfy #47197.
Vince: please commit this if it's ok with you, or let me know and I'll commit it.
comment:6 Changed 9 years ago by Veence (Vincent)
I’ll do that.
Vince: please commit this if it's ok with you, or let me know and I'll commit it.
Ryan, don’t ask me permission. Go ahead if you feel it! You’re much more competent than I am, and, anyways, I trust you blindly on all matters! :)
comment:8 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Thanks! I ask permission because it is our policy to do so when the port is not marked openmaintainer.
comment:9 Changed 9 years ago by Veence (Vincent)
You can forget that policy in my case, I’m not going to resent it. Feel free to push anything you like any time.
comment:10 Changed 8 years ago by kurthindenburg (Kurt Hindenburg)
Cc: | khindenburg@… added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I believe this was resolved w/ the commit above
Log file