Re: How to cross compile Apple Silicon target under Intel Apple computer ?

2021-01-28 Thread Gilles Caulier
Ticket created :

https://trac.macports.org/ticket/62173

Gilles Caulier

Le jeu. 28 janv. 2021 à 19:17, Craig Treleaven  a écrit :
>
> > On Jan 28, 2021, at 12:30 PM, Gilles Caulier  
> > wrote:
> >
> >
> > Of course as expected it stop after a long computation. It's about a
> > ffmpeg dependency : gmp
> >
> > [macports/tools] > clean gmp
> > --->  Cleaning gmp
> > [macports/tools] > install gmp
> > --->  Fetching distfiles for gmp
> > --->  Verifying checksums for gmp
> > --->  Extracting gmp
> > --->  Applying patches to gmp
> > --->  Configuring gmp
> > Error: Failed to configure gmp, consult
> > /opt/digikam.org.arm64/var/macports/build/_opt_digikam.org.arm64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/work/gmp-6.2.1/config.log
> > Error: Failed to configure gmp: configure failure: command execution failed
> > Error: See 
> > /opt/digikam.org.arm64/var/macports/logs/_opt_digikam.org.arm64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/main.log
> > for details.
> > Error: Follow https://guide.macports.org/#project.tickets to report a bug.
> > Error: Processing of port gmp failed
> >
> > Are you agree that i open a generic file in bugzilla about digiKam
> > deps broken with Silicon ?
>
> Hmm, as of now, our user-submitted stats show that there are 14 installations 
> of gmp on arm64:
>
> https://ports.macports.org/port/gmp/stats?days=30_ago=0
>
> I presume that is people with M1 Macs that have built and installed the 
> software on that machine.
>
> The gmp port has some interesting comments and code related to informing 
> configure of the (build?) CPU in order to get the best performance from the 
> compiled code:
>
> https://github.com/macports/macports-ports/blob/master/devel/gmp/Portfile#L104
>
> If I read this right (which is not at all assured), it looks like for 
> non-universal builds, it is assuming that the build and target machines must 
> have the same CPU.  Which is the opposite of your case.  Perhaps you would 
> have more success if you tried to build everything universal?
>
> The log referred to in the error messages  
> (/opt/digikam.org.arm64/var/macports/logs/_opt_digikam.org.arm64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/main.log)
>  should confirm if this was the problem.
>
> If you need to file a ticket, have it refer to the port that is failing.  It 
> is not especially relevant that you are trying to install it as part of the 
> installation of DigiKam.
>
> Craig


Re: fetching distfiles for p5.30-libapreq2 hanging or crashing macOS Big Sur

2021-01-28 Thread Murray Eisenberg
Alas, now with Xcode CLT 12.4, command "sudo port -ns upgrade --force apr” 
gives a configure failure.

See: https://trac.macports.org/ticket/61321#comment:9 



 
> On 28 Jan2021, at 11:15 AM, Ryan Schmidt  wrote:
> 
> 
> 
> On Jan 27, 2021, at 19:38, Murray Eisenberg wrote:
> 
>> OK…I’ve seemingly overcome the Big Sur 11.1 crashes with p5.30-libapreq2 
>> installation by installing MacPorts.
>> 
>> Unfortunately, to install  p5.30-libapreq2 requires installing mod_perl2 
>> variant +perl5_30. But building the latter fails! See: 
>> https://trac.macports.org/ticket/62169
>> 
>> (That sinking feeling from getting deeper and deeper toward an abyss!)
> 
> Use the workaround I posted in 
> https://trac.macports.org/ticket/61321#comment:6 -- run:
> 
> sudo port -ns upgrade --force apr
> 
> Then of course
> 
> sudo port clean mod_perl2
> 
> before trying to install mod_perl2 again.
> 

---
Murray Eisenbergmurrayeisenb...@gmail.com
503 King Farm Blvd #101 
Rockville, MD 20850-6667Mobile (413)-427-5334




Re: How to cross compile Apple Silicon target under Intel Apple computer ?

2021-01-28 Thread Craig Treleaven
> On Jan 28, 2021, at 12:30 PM, Gilles Caulier  wrote:
> 
> 
> Of course as expected it stop after a long computation. It's about a
> ffmpeg dependency : gmp
> 
> [macports/tools] > clean gmp
> --->  Cleaning gmp
> [macports/tools] > install gmp
> --->  Fetching distfiles for gmp
> --->  Verifying checksums for gmp
> --->  Extracting gmp
> --->  Applying patches to gmp
> --->  Configuring gmp
> Error: Failed to configure gmp, consult
> /opt/digikam.org.arm64/var/macports/build/_opt_digikam.org.arm64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/work/gmp-6.2.1/config.log
> Error: Failed to configure gmp: configure failure: command execution failed
> Error: See 
> /opt/digikam.org.arm64/var/macports/logs/_opt_digikam.org.arm64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/main.log
> for details.
> Error: Follow https://guide.macports.org/#project.tickets to report a bug.
> Error: Processing of port gmp failed
> 
> Are you agree that i open a generic file in bugzilla about digiKam
> deps broken with Silicon ?

Hmm, as of now, our user-submitted stats show that there are 14 installations 
of gmp on arm64:

https://ports.macports.org/port/gmp/stats?days=30_ago=0

I presume that is people with M1 Macs that have built and installed the 
software on that machine.

The gmp port has some interesting comments and code related to informing 
configure of the (build?) CPU in order to get the best performance from the 
compiled code:

https://github.com/macports/macports-ports/blob/master/devel/gmp/Portfile#L104

If I read this right (which is not at all assured), it looks like for 
non-universal builds, it is assuming that the build and target machines must 
have the same CPU.  Which is the opposite of your case.  Perhaps you would have 
more success if you tried to build everything universal?

The log referred to in the error messages  
(/opt/digikam.org.arm64/var/macports/logs/_opt_digikam.org.arm64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gmp/gmp/main.log)
 should confirm if this was the problem.

If you need to file a ticket, have it refer to the port that is failing.  It is 
not especially relevant that you are trying to install it as part of the 
installation of DigiKam.  

Craig

Re: How to cross compile Apple Silicon target under Intel Apple computer ?

2021-01-28 Thread Gilles Caulier
Voilà,

I start the stage 1 to install all low level dependencies for digiKam Silicon.
Just my macports.conf configuration file is customized like this :

+no_root -startupitem
startupitem_type none
startupitem_install no
macosx_deployment_target 11.0
build_arch arm64

There is nothing customized in variants.conf.

Plenty of ports are installed now, including cmake:

MacPorts 2.6.4
Entering shell mode... ("help" for help, "quit" to quit)
[macports/tools] > installed
The following ports are currently installed:
  asciidoc @9.0.4_0 (active)
  autoconf @2.69_5 (active)
  autoconf-archive @2019.01.06_0 (active)
  automake @1.16.3_0 (active)
  bison @3.7.4_0 (active)
  bison-runtime @3.7.4_0 (active)
  boost @1.71.0_3+no_single+no_static+python38 (active)
  brotli @1.0.9_0 (active)
  bzip2 @1.0.8_0 (active)
  cairo @1.16.0_1+quartz+x11 (active)
  ccache @4.1_0 (active)
  cctools @949.0.1_0+xcode (active)
  cmake @3.19.3_0 (active)
  curl @7.74.0_0+ssl (active)
  curl-ca-bundle @7.74.0_0 (active)
  dav1d @0.8.0_0 (active)
  db48 @4.8.30_4 (active)
  dbus @1.12.20_0 (active)
  docbook-xml @5.0_3 (active)
  docbook-xml-4.1.2 @5.0_1 (active)
  docbook-xml-4.2 @5.0_1 (active)
  docbook-xml-4.3 @5.0_1 (active)
  docbook-xml-4.4 @5.0_1 (active)
  docbook-xml-4.5 @5.0_1 (active)
  docbook-xml-5.0 @5.0_1 (active)
  docbook-xsl-nons @1.79.2_0 (active)
  eigen3 @3.3.9_0 (active)
  expat @2.2.10_0 (active)
  flex @2.6.4_0 (active)
  fontconfig @2.13.1_0 (active)
  fop @1.1_1 (active)
  freetype @2.10.4_0 (active)
  fribidi @1.0.10_0 (active)
  gawk @5.1.0_0 (active)
  gd2 @2.3.0_1+x11 (active)
  gdbm @1.18.1_1 (active)
  gettext @0.19.8.1_2 (active)
  ghostscript @9.53.3_1+x11 (active)
  giflib @4.2.3_0 (active)
  glib2 @2.58.3_1+x11 (active)
  gmake @4.3_0 (active)
  gobject-introspection @1.60.2_5 (active)
  gperf @3.1_0 (active)
  graphite2 @1.3.13_1 (active)
  graphviz @2.40.1_4+pangocairo+x11 (active)
  groff @1.22.4_4 (active)
  gtk-doc @1.32_1+python38 (active)
  gts @0.7.6-20121130_1 (active)
  harfbuzz @2.7.4_0 (active)
  help2man @1.47.17_0 (active)
  icu @67.1_3 (active)
  itstool @2.0.6_0+python38 (active)
  jasper @2.0.14_1 (active)
  jbig2dec @0.19_0 (active)
  jbigkit @2.1_0 (active)
  jpeg @9d_1 (active)
  lcms2 @2.11_1 (active)
  lensfun @0.3.2_5 (active)
  libarchive @3.5.1_0 (active)
  libcxx @5.0.1_4 (active)
  libedit @20191231-3.1_0 (active)
  libexif @0.6.22_0 (active)
  libffi @3.3_1 (active)
  libgphoto2 @2.5.26_1 (active)
  libical @3.0.8_1 (active)
  libiconv @1.16_1 (active)
  libidn @1.36_0 (active)
  libidn2 @2.3.0_0 (active)
  libjpeg-turbo @2.0.6_0 (active)
  libLASi @1.1.3_1 (active)
  libnetpbm @10.93.00_0 (active)
  libpaper @1.1.28_0 (active)
  libpixman @0.38.4_0 (active)
  libpng @1.6.37_0 (active)
  libpsl @0.21.1-20200817_0 (active)
  libtool @2.4.6_11 (active)
  libunistring @0.9.10_0 (active)
  libusb @1.0.24_0 (active)
  libusb-compat @0.1.7_0 (active)
  libuv @1.40.0_0 (active)
  libxml2 @2.9.10_1 (active)
  libxslt @1.1.34_4 (active)
  lz4 @1.9.3_0 (active)
  lzip @1.22_0 (active)
  lzma @4.65_1 (active)
  lzo2 @2.10_0 (active)
  m4 @1.4.18_2 (active)
  meson @0.55.3_1 (active)
  nasm @2.15.05_0 (active)
  ncurses @6.2_1 (active)
  netpbm @10.93.00_1+x11 (active)
  ninja @1.10.2_0 (active)
  openjpeg @2.3.1_0 (active)
  openssl @1.1.1i_0 (active)
  ossp-uuid @1.6.2_11+perl5_28 (active)
  p5.28-locale-gettext @1.70.0_0 (active)
  pango @1.42.4_2+quartz+x11 (active)
  pcre @8.44_1 (active)
  perl5 @5.28.3_0+perl5_28 (active)
  perl5.28 @5.28.3_1 (active)
  perl5.30 @5.30.3_0 (active)
  pkgconfig @0.29.2_0 (active)
  psutils @p17_1 (active)
  py38-anytree @2.8.0_0 (active)
  py38-beaker @1.11.0_0 (active)
  py38-libxml2 @2.9.10_0 (active)
  py38-lxml @4.4.1_0 (active)
  py38-mako @1.1.4_0 (active)
  py38-markdown @3.3.3_0 (active)
  py38-markupsafe @1.1.1_0 (active)
  py38-pygments @2.7.4_0 (active)
  py38-setuptools @51.3.3_0 (active)
  py38-six @1.15.0_0 (active)
  pygments_select @0.1_0 (active)
  python3_select @0.0_2 (active)
  python38 @3.8.7_0 (active)
  python_select @0.3_9 (active)
  re2c @2.0.3_0 (active)
  readline @8.1.000_0 (active)
  sqlite3 @3.34.1_0 (active)
  texinfo @6.7_1 (active)
  tiff @4.2.0_1 (active)
  uchardet @0.0.7_0 (active)
  urw-fonts @1.0.7pre44_0 (active)
  vala @0.50.2_0 (active)
  webp @1.1.0_1 (active)
  x265 @3.2.1_0 (active)
  Xft2 @2.3.3_0 (active)
  xmlcatmgr @2.2_1 (active)
  xorg-libice @1.0.10_0 (active)
  xorg-libpthread-stubs @0.4_0 (active)
  xorg-libsm @1.2.3_0 (active)
  xorg-libX11 @1.7.0_0 (active)
  xorg-libXau @1.0.9_0 (active)
  xorg-libXaw @1.0.13_2 (active)
  xorg-libxcb @1.14_0+python38 (active)
  xorg-libXdmcp @1.1.3_0 (active)
  xorg-libXext @1.3.4_0 (active)
  xorg-libXmu @1.1.3_0 (active)
  xorg-libXt @1.2.0_0 (active)
  xorg-util-macros @1.19.2_0 (active)
  xorg-xcb-proto @1.14.1_0+python38 (active)
  xorg-xcb-util @0.4.0_1 (active)
  xorg-xorgproto @2020.1_0 (active)
  xorg-xtrans @1.4.0_0 (active)
  xpm @3.5.13_0 

Re: Requested munt-mt32emu port file

2021-01-28 Thread Ryan Schmidt



On Jan 28, 2021, at 06:13, Janosch Peters wrote:

>> yesterday I requested a port of Munt’s mt32emu library 
>> (munt.sourceforge.net)  at https://trac.macports.org/ticket/62166 and just 
>> added a working portfile 
>> https://trac.macports.org/attachment/ticket/62166/Portfile. 
> 
> Could you please create a pull request on GitHub for this? This method of 
> contribution is „strongly preferred“ over trac tickets. See 
> https://guide.macports.org/chunked/project.contributing.html.

If you can make a pull request that's great, but portfiles and/or patchfiles 
attached to ticket are still accepted.


>> What I didn’t manage to do:
>> 
>> - *kind of* had to hard code the master_sites link. I noticed other projects 
>> use “sourceforge:project/projectname” but however I did this it either did 
>> not find anything or grabbed a webpage.

I've provided the correct value to use in your ticket.


> The code for munt is also hosted on GitHub. I recommend using the GitHub port 
> group which works very well in my experience. By doing that, you don’t need 
> to configure master_sites and as a bonus you get the live check out of the 
> box. See https://guide.macports.org/chunked/reference.portgroup.html for more 
> information.

Note that projects using sourceforge master_sites also get a default and 
often-working livecheck out of the box.

Using the github portgroup for software hosted at GitHub is indeed recommended. 
As to whether the download should be from GitHub or SourceForge, you'd have to 
compare the two distfiles and see if they're sufficiently equivalent.



Re: fetching distfiles for p5.30-libapreq2 hanging or crashing macOS Big Sur

2021-01-28 Thread Ryan Schmidt



On Jan 27, 2021, at 19:38, Murray Eisenberg wrote:

> OK…I’ve seemingly overcome the Big Sur 11.1 crashes with p5.30-libapreq2 
> installation by installing MacPorts.
> 
> Unfortunately, to install  p5.30-libapreq2 requires installing mod_perl2 
> variant +perl5_30. But building the latter fails! See: 
> https://trac.macports.org/ticket/62169
> 
> (That sinking feeling from getting deeper and deeper toward an abyss!)

Use the workaround I posted in https://trac.macports.org/ticket/61321#comment:6 
-- run:

sudo port -ns upgrade --force apr

Then of course

sudo port clean mod_perl2

before trying to install mod_perl2 again.



Re: fetching distfiles for p5.30-libapreq2 hanging...

2021-01-28 Thread Ryan Schmidt
On Jan 28, 2021, at 08:13, Murray Eisenberg wrote:

> On 27 Jan 2021 16:05:57 -0600, Ryan Schmidt wrote:
> 
>> You should not configure and make any software as root or with sudo. Use 
>> your own user account. Only use sudo to make install.
> 
> Does the dictum against configuring or making any software with sudo apply to 
> installing and upgrading ports with MacPorts? 

Yes it applies, and MacPorts does it for you.

> i ask because I always need to use "sudo port install…." and "sudo port 
> upgrade …." , etc. Should I change ownership of MacPorts directories? And if 
> so, which ones?

In a normal MacPorts installation, you use sudo when you want MacPorts to do 
things that write to disk, including port install, port upgrade, port 
selfupdate, port sync, etc. MacPorts won't work if you don't do this, because 
the directories it's writing into in /opt/local are intentionally owned by root.

The MacPorts installer create a "macports" macOS user account, which has no 
special privileges, and MacPorts switches internally from root to the macports 
user when doing things that should not be done as root, for example during the 
configure and build phases of a port installation. This is even more secure 
than using your own user account to configure and build. If you use your own 
user account, a rogue build process could affect (corrupt, delete) any file 
your user account can (anything in your home directory). But with MacPorts 
using its "macports" user account, it can only affect things owned by that user 
account.

You should not manually change the ownership of any MacPorts directories to 
circumvent this protection.

It is possible when you build MacPorts from source to configure it in a way 
that does not require the use of sudo. This is not recommended because then it 
runs under entirely your user account and you forfeit the protections that 
would have been provided by using the "macports" user.



Re: fetching distfiles for p5.30-libapreq2 hanging...

2021-01-28 Thread Murray Eisenberg


> On27 Jan 2021 16:05:57 -0600, Ryan Schmidt  > wrote:
> 
> 
> On Jan 27, 2021, at 15:55, Murray Eisenberg wrote:
>> 
>> Ahh?that helps greatly, thank you!
>> 
>> I notice that most, or even all, of the commands given it the ?2.2.3 Git 
>> install? directions at https://guide.macports.org/#installing.macports.git 
>> require that I use 
>> ?sudo?, even though I?m on an admin account. For example, I had to do:
>> 
>>  sudo mkdir -p /iopt/mports
>> 
>> and
>> 
>>  sudo ./configure ?enable-readline
>>  sudo make
>> 
>> whereas the only commands listed in those directions indicate the need for 
>> sudo only in ?sudo make install?.
>> 
>> Am I doing something wrong?
> 
> On my system, /opt is a directory owned by root. Perhaps it is the same on 
> your system. As such, yes, you need sudo to be able to create a file or 
> directory inside it.
> 
> You could set the ownership of the directory that you create to yourself so 
> that you can then perform further operations inside that directory as your 
> user without sudo.
> 
> sudo mkdir /opt/mports
> sudo chown yourusername /opt/mports
> cd /opt/mports
> ...
> 
> You should not configure and make any software as root or with sudo. Use your 
> own user account. Only use sudo to make install.

Does the dictum against configuring or making any software with sudo apply to 
installing and upgrading ports with MacPorts? 

i ask because I always need to use "sudo port install…." and "sudo port upgrade 
…." , etc. Should I change ownership of MacPorts directories? And if so, which 
ones?


---
Murray Eisenbergmurrayeisenb...@gmail.com
503 King Farm Blvd #101 
Rockville, MD 20850-6667Mobile (413)-427-5334




Re: Requested munt-mt32emu port file

2021-01-28 Thread Janosch Peters via macports-users
Hi Dominik,

> yesterday I requested a port of Munt’s mt32emu library (munt.sourceforge.net 
> )  at https://trac.macports.org/ticket/62166 
>  and just added a working portfile 
> https://trac.macports.org/attachment/ticket/62166/Portfile 
> . 

Could you please create a pull request on GitHub for this? This method of 
contribution is „strongly preferred“ over trac tickets. See 
https://guide.macports.org/chunked/project.contributing.html 
.

> 
> What I didn’t manage to do:
> 
> - *kind of* had to hard code the master_sites link. I noticed other projects 
> use “sourceforge:project/projectname” but however I did this it either did 
> not find anything or grabbed a webpage.

The code for munt is also hosted on GitHub. I recommend using the GitHub port 
group which works very well in my experience. By doing that, you don’t need to 
configure master_sites and as a bonus you get the live check out of the box. 
See https://guide.macports.org/chunked/reference.portgroup.html 
 for more 
information.

Regards,
Janosch

Requested munt-mt32emu port file

2021-01-28 Thread Dominik Reichardt
Hi all,

yesterday I requested a port of Munt’s mt32emu library (munt.sourceforge.net 
)  at https://trac.macports.org/ticket/62166 
 and just added a working portfile 
https://trac.macports.org/attachment/ticket/62166/Portfile 
. 

What I didn’t manage to do:

- *kind of* had to hard code the master_sites link. I noticed other projects 
use “sourceforge:project/projectname” but however I did this it either did not 
find anything or grabbed a webpage.

- provide both a shared and static version of the library. By default a shared 
library gets build while you need to pass "-Dlibmt32emu_SHARED=FALSE” for the 
static one. But it’s either or, not both at the same time. I don’t know whether 
there is a way for two configure/build phases in one port file. But the shared 
one is the most important one anyway and if you think it is worthwhile to 
pursue, I can ask the Munt developer whether he could make it possible to have 
both.

Otherwise the library portfile is ready to be used I think (quick test worked 
on my system).

I am aiming to create a port file for the two Munt programs as well, but that 
is maybe a bit more of a challenge as the GUI program mt32emu-qt can be build 
against either QT4 and QT5 (other than that it is very straightforward with 
dependency on glib2 and optional JACK and Portaudio)

Cheers,

Dom