[MacPorts] #69380: libffi fails on 10.5 PPC for bad patch

MacPorts noreply at macports.org
Fri Feb 23 12:51:23 UTC 2024


#69380: libffi fails on 10.5 PPC for bad patch
-----------------------+-------------------------
  Reporter:  rmottola  |      Owner:  (none)
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:  leopard ppc
      Port:  libffi    |
-----------------------+-------------------------

Comment (by ballapete):

 Replying to [comment:9 rmottola]:
 > libffi is a very base building block indeed.
 > Is it possible to run tests easily?

 Sometimes: Yes! Just try `port test <port name>`.

 Other times `Portfile` is not prepared for testing the just built
 software. Then you would to check whether the software itself provides
 tests. This can be performed this was:

 0. I am an amateur. Could be there are easier ways.

 1. Run `port -vs build <port name>`. The `option -s` is not really
 necessary. To `build`something `port` would need to `fetch`, `extract`,
 potentially `patch`, and finally `configure` the software's sources. The
 `option -v` provides some output of what `port` is performing. (You could
 even add the `option -d` to make `port` output some `debug` messages about
 its work.) (Another option could be `-k` to make `port` keep the software,
 usually needed when built software can be installed for a first time or
 just upgraded. This inherently cleans the working directory.)

 2. When the software has built successfully you might keep the window
 where it was built, where output from this is saved. It contains this or
 that useful information.

 3. It is useful to open a new Terminal or whatever window for the next
 step. The `build` window contains quite early a line starting with
 'Executing:  cd "/opt/…" && configure …'. You could just copy the cd
 command (until " &&", but not including these three characters, the double
 quotes do not matter) and paste it on the command line (or Terminal, GNU
 Emacs, whatever gives you a `shell` with prompt and a command line). This
 way you **c**hange your working **d**irectory to where the software was
 built

 `port` itself can give you a hint where this happened: `port work 'port
 name'`. The output path name always ends in `work`. You will have to add
 at least one more component, which the shell's command line can add upon
 `file name completion` action, which is typing cd, a SPACE character, and
 then pasting the output of `port work 'port name'`. To `complete` this
 path (or file) name you type TAB. When no choice is left, i.e. there is
 only more component existing to extend the lengthy path name, this one is
 automatically added. When alternatives exist, these are shown and you need
 to choose and type at least as many characters of your choice that shell
 will know that upon next TAB it can only expand to one unique and
 unambiguous name.

 4. In the software's build directory a file `Makefile` will exist. It
 contains so-called `targets`, marked with a COLON at the end of the
 target's name. Such targets can be `check` or `test`. One of them will
 perform the tests. On the command line they are invoked as `make test` or
 `make check`. Then some unpredictable output can happen…

 5. Try and learn! You can look inside `Makefile` with some text editor
 (vi, nano, pico, whatever) best in read-only mode. Once you understand the
 instructions for `make` (or `gmake`), kept on the lines below the target's
 name,  you can understand which additional utilities might get invoked
 (your system might be missing, `expect` for example) or whatever internal
 software will be built to perform the tests.

 6. Choose some other ports to learn more.

 7. When finished, perform `port clean 'port name'` to remove the software
 tree. Before you can always invoke `port install 'port name'` or `port
 upgrade 'port name'`. Running any of these three will remove the working
 directory where you invoked `make test` or `make check`. The shell or
 command line will become unusable. To keep it usable just invoke `cd`
 before you start cleaning, installing, or upgrading.

 Does this "recipe" help a bit?

-- 
Ticket URL: <https://trac.macports.org/ticket/69380#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list