ledger fails to build after boost upgrade to 1.70.0

2019-08-13 Thread Kastus Shchuka
Hi,

After doing “port upgrade outdated” boost was upgraded to 1.70.0_0, and it 
triggered rebuild of ledger @3.1.1_4.

The error in 
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_finance_ledger/ledger/main.log
 is this:

:info:configure -- Found PythonInterp: /opt/local/bin/python2.7 (found version 
"2.7.16") 
:info:configure -- Found PythonLibs: /opt/local/lib/libpython2.7.dylib (found 
version "2.7.10") 
:info:configure CMake Error at 
/opt/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 
(message):
:info:configure   Could NOT find Boost (missing: python) (found suitable 
version "1.70.0",
:info:configure   minimum required is "1.49.0”)

This is the version of boost that I have after upgrade:

  boost @1.70.0_0+no_single+no_static+python27 (active)

Am I missing something obvious here?

Thanks,

Kastus




Re: What am I forgetting?

2019-08-13 Thread Chris Jones
Hi

First, please keep your replies on list.

You will need a fork if you ever wish to create a feature branch to use to 
submit a PR to update a port.

Cheers Chris

> On 13 Aug 2019, at 7:55 pm, Gerben Wierda  wrote:
> 
> Albus:macports-ports sysbh$ git remote -v
> originhttps://github.com/macports/macports-ports.git (fetch)
> originhttps://github.com/macports/macports-ports.git (push)
> 
> I don't have a fork.
> 
> Should I work in a fork or is it OK to work like this?
> 
> G
> 
>>> On 13 Aug 2019, at 16:24, Chris Jones  wrote:
>>> 
>>> 
>>> sudo port -d sync
>>> ( -d just means debug mode, which means you see what is actually run )
>>> this then will in effect run
>>> git pull --rebase --autostash origin master
>> 
>> One detail just came to my mind.
>> 
>> In your clone, make sure the 'origin' remote is the main macports one, and 
>> not some other clone. This helps make things run a bit smoother. You can 
>> then have as many other remotes as you want, for various forks. e.g. I 
>> (currently) have
>> 
>> Titan ~/Projects/MacPorts/ports > git remote -v
>> cjones   g...@github.com:cjones051073/macports-ports.git (fetch)
>> cjones   g...@github.com:cjones051073/macports-ports.git (push)
>> giansalvog...@github.com:giansalvo/macports-ports.git (fetch)
>> giansalvog...@github.com:giansalvo/macports-ports.git (push)
>> herbygillot  g...@github.com:herbygillot/macports-ports.git (fetch)
>> herbygillot  g...@github.com:herbygillot/macports-ports.git (push)
>> michaelldg...@github.com:michaelld/macports-ports.git (fetch)
>> michaelldg...@github.com:michaelld/macports-ports.git (push)
>> origin   g...@github.com:macports/macports-ports.git (fetch)
>> origin   g...@github.com:macports/macports-ports.git (push)
>> yan  g...@github.com:yan12125/macports-ports.git (fetch)
>> yan  g...@github.com:yan12125/macports-ports.git (push)
>> 
>> so 'origin' is the primary source, and the others are either my own fork, or 
>> others I have added to work with feature branches now and then.
>> 
>> Chris
> 


Re: What am I forgetting?

2019-08-13 Thread Chris Jones




sudo port -d sync

( -d just means debug mode, which means you see what is actually run )

this then will in effect run

git pull --rebase --autostash origin master


One detail just came to my mind.

In your clone, make sure the 'origin' remote is the main macports one, 
and not some other clone. This helps make things run a bit smoother. You 
can then have as many other remotes as you want, for various forks. e.g. 
I (currently) have


Titan ~/Projects/MacPorts/ports > git remote -v
cjones  g...@github.com:cjones051073/macports-ports.git (fetch)
cjones  g...@github.com:cjones051073/macports-ports.git (push)
giansalvo   g...@github.com:giansalvo/macports-ports.git (fetch)
giansalvo   g...@github.com:giansalvo/macports-ports.git (push)
herbygillot g...@github.com:herbygillot/macports-ports.git (fetch)
herbygillot g...@github.com:herbygillot/macports-ports.git (push)
michaelld   g...@github.com:michaelld/macports-ports.git (fetch)
michaelld   g...@github.com:michaelld/macports-ports.git (push)
origin  g...@github.com:macports/macports-ports.git (fetch)
origin  g...@github.com:macports/macports-ports.git (push)
yan g...@github.com:yan12125/macports-ports.git (fetch)
yan g...@github.com:yan12125/macports-ports.git (push)

so 'origin' is the primary source, and the others are either my own 
fork, or others I have added to work with feature branches now and then.


Chris


Re: What am I forgetting?

2019-08-13 Thread Chris Jones




And the two ways this directory tree is going to be updated, git and port, they 
do not conflict? What if I do some git work in the nsd directory and then port 
updates it, aren’t my changes overwritten?


No, they do not conflict.

If you have told port that /Users/sysbh/MacPortsDev/macports-port is 
your default source, then when you run


sudo port -d sync

( -d just means debug mode, which means you see what is actually run )

this then will in effect run

git pull --rebase --autostash origin master

in your checkout. The --autostash here means your changes will be 
preserved. Next it will run


portindex

to update the index.

Chris


Re: What am I forgetting?

2019-08-13 Thread Chris Jones



And all the ports are now the ones in my git clone. That is not what I 
want. Preferably, I would want all the ports to be the default ones, 
except for the ones I’m working on myself. Is that possible? And how do 
I get there from the situation I’m in now?


My guess would be:
- re-run portindex in the official 
tree /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports 

- run portindex in de nsd and unbound subdirectories of 
/Users/sysbh/MacPortsDev/macports-port


Correct?


If /Users/sysbh/MacPortsDev/macports-port is a complete clone of the 
ports tree, then you cannot avoid portindex being complete for it.


In practise though, this is really not an issue. When you first ran 
portindex it likely took a while, but that is only because it had to 
index every port that first time. Subsequent runs will be a lot faster 
as only the changed ports will be indexed.


Likewise, working with /Users/sysbh/MacPortsDev/macports-port with git 
will be a LOT simplier if it is a complete git clone.


So, my recommendation. Stick with what you have now.

Chris


Re: What am I forgetting?

2019-08-13 Thread Gerben Wierda
On 13 Aug 2019, at 13:25, Mojca Miklavec  wrote:
> 
> On Tue, 13 Aug 2019 at 10:25, Gerben Wierda  wrote:
>> 
>> I have my own cloud git directory tree
>> I cd to $thattree/net/unbound
>> I edit the Portfile (startupitem), set revision to 1 (there was no revision)
>> I run sudo port install unbound
>> It is not built and installed as nothing has changed (but there has)
>> 
>> What am I forgetting?
>> 
>> 
>> Did you add your local git checkout to configuration as your local
>> repository with higher preference?
>>   https://guide.macports.org/chunked/development.local-repositories.html
>> Check this with
>>   port dir unbound
>> 
>> 
>> I did edit sources.conf. It contains:
>> 
>> file:///Users/sysbh/MacPortsDev
>> rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]
>> 
>> But whatever is in there, port dir unbound gets met the standard repository.
>> 
>> Albus:nsd sysbh$ port dir unbound
>> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/unbound
>> 
>> So, als with
>> 
>> file:///Users/sysbh/MacPortsDev/macports-port
>> rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]
> 
> Later in the mail you reference "macports-port" with "macports-ports"
> instead. Which one is it?

The correct one, typo in mail.

> Also, you need to run "portindex" inside of macports-ports. Just in
> case that you didn't do it already.

That was it. It was on the manual page for local repositories, but this 
directory tree was created using git via 
https://trac.macports.org/wiki/WorkingWithGit 
 where portindex is not 
mentioned and I was following instructions there when I created the ‘dev’ tree.

I ran portindex. Since I created a git clone there, that resulted in

Total number of ports parsed:   21661 
Ports successfully parsed:  21661 
Ports failed:   0 
Up-to-date ports skipped:   0

And all the ports are now the ones in my git clone. That is not what I want. 
Preferably, I would want all the ports to be the default ones, except for the 
ones I’m working on myself. Is that possible? And how do I get there from the 
situation I’m in now?

My guess would be:
- re-run portindex in the official tree 
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports
- run portindex in de nsd and unbound subdirectories of 
/Users/sysbh/MacPortsDev/macports-port

Correct?

G

> 
> Mojca



Re: I'm already using Homebrew for a couple of things, Is it problematic to use Homebrew and MacPorts side by side?

2019-08-13 Thread Clemens Lang
Hi,

- On 13 Aug, 2019, at 05:01, Ken Cunningham ken.cunningham.web...@gmail.com 
wrote:

> Compilers like clang are prebuilt to search first in /usr/local for include
> files and libraries, and then after that in /usr (or -isysroot).
> 
> SO -- if you have things installed in /usr/local then those headers and
> libraries will be found automatically and, helpfully, USED.
> 
> THIS is why people love HomeBrew so much -- things seem to  "just work" 
> because
> they are installed (or symlinked) into /usr/local.
> 
> However, this is also why things break cryptically without being able to 
> figure
> out what the heck is going on. Because headers in /usr/local are being used
> instead of the ones you thought would be used.
> 
> IF you are very very clever, and can keep track of all this, you can use
> multiple different systems together successfully.

To re-iterate on this, if you really really want to keep things in /usr/local, 
make it
a habit of doing all your port operations with the `-t` flag to enable trace 
mode (see
https://trac.macports.org/wiki/FAQ#buildfails, point 4).

Trace mode will make a best effort to hide files in /usr/local (and other 
locations
that shouldn't exist on a "clean" system) from the build. Your builds will be 
slower,
but they will be less likely to fail.

-- 
Clemens Lang


Re: What am I forgetting?

2019-08-13 Thread Mojca Miklavec
On Tue, 13 Aug 2019 at 10:25, Gerben Wierda  wrote:
>
> I have my own cloud git directory tree
> I cd to $thattree/net/unbound
> I edit the Portfile (startupitem), set revision to 1 (there was no revision)
> I run sudo port install unbound
> It is not built and installed as nothing has changed (but there has)
>
> What am I forgetting?
>
>
> Did you add your local git checkout to configuration as your local
> repository with higher preference?
>https://guide.macports.org/chunked/development.local-repositories.html
> Check this with
>port dir unbound
>
>
> I did edit sources.conf. It contains:
>
> file:///Users/sysbh/MacPortsDev
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]
>
> But whatever is in there, port dir unbound gets met the standard repository.
>
> Albus:nsd sysbh$ port dir unbound
> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/unbound
>
> So, als with
>
> file:///Users/sysbh/MacPortsDev/macports-port
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]

Later in the mail you reference "macports-port" with "macports-ports"
instead. Which one is it?
Also, you need to run "portindex" inside of macports-ports. Just in
case that you didn't do it already.

Mojca


Re: To root or not to root?

2019-08-13 Thread Christopher Jones


> On 13 Aug 2019, at 9:03 am, Christopher Jones  
> wrote:
> 
> 
> 
>> On 12 Aug 2019, at 9:40 pm, Gerben Wierda > > wrote:
>> 
>> As I’m working my way to somewhat knowing what I’m doing, I have a question.
>> 
>> I always set the timeout on sudo on my systems to 0 seconds. So, for every 
>> sudo command I enter, I have to type the password. This is somewhat safer 
>> than having a timeout (normally 300sec).
> 
> What I do is allow ${prefix}/bin/port to run through sudo without requiring a 
> password. you can do this by adding
> 
> chris   ALL=(ALL) NOPASSWD: /opt/local/bin/port

should have added here the above is added via ‘visudo'

Chris

> 
> this in my opinion has two advantages
> 
> 1. I never have to type my passport for running port
> 2. Because of 1., sudo never fully authenticates, so if I was to run another 
> command through sudo immediately after port, that command will ask for my 
> password.
> 
> In my view, the above is more convenient, and also safer against my 
> accidental bad usage of sudo.
> 
> Chris
> 
>> 
>> This becomes tedious when there are many sudo commands to perform, so in 
>> that case, I often revert to running sudo -s or sudo -i, do my work as root 
>> and kill the subshell. This has risks too (e.g. doing a wrong rm command, 
>> but I’m pretty paranoiac about stuff like rm)
>> 
>> For my first steps with macports, I’ve run everything as root that way, 
>> because I expected there would be changes in /Library/LaunchDaemons etc and 
>> I did not want toe be typing my password all the time.
>> 
>> But I’m wondering if I should move back to running everything as ordinary 
>> user.
>> 
>> Are there disadvantages to running to port commands as root?
>> 
>> If I want to revert, what should I chown to that user? How should ownership 
>> in /opt be?
>> 
>> Gerben Wierda
>> Chess and the Art of Enterprise Architecture 
>> Mastering ArchiMate 
>> Architecture for Real Enterprises 
>>  at 
>> InfoWorld
>> On Slippery Ice  at EAPJ
>> 
> 



smime.p7s
Description: S/MIME cryptographic signature


Re: What am I forgetting?

2019-08-13 Thread Christopher Jones


> On 13 Aug 2019, at 9:25 am, Gerben Wierda  wrote:
> 
> Thanks Mojca,
> 
>> On 13 Aug 2019, at 03:22, Mojca Miklavec > > wrote:
>> 
>> On Tue, 13 Aug 2019 at 01:24, Gerben Wierda > > wrote:
>>> 
>>> I have my own cloud git directory tree
>>> I cd to $thattree/net/unbound
>>> I edit the Portfile (startupitem), set revision to 1 (there was no revision)
>>> I run sudo port install unbound
>>> It is not built and installed as nothing has changed (but there has)
>>> 
>>> What am I forgetting?
>> 
>> Did you add your local git checkout to configuration as your local
>> repository with higher preference?
>>https://guide.macports.org/chunked/development.local-repositories.html 
>> 
>> Check this with
>>port dir unbound
> 
> I did edit sources.conf. It contains:
> 
> file:///Users/sysbh/MacPortsDev 
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar 
>  [default]
> 
> But whatever is in there, port dir unbound gets met the standard repository.
> 
> Albus:nsd sysbh$ port dir unbound
> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/unbound
>  
> 
> So, als with
> 
> file:// 
> /Users/sysbh/MacPortsDev/macports-port
>  
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar 
>  [default]


just comment out the old tarball default, and make you area the default…

Chris

> 
> 
>> If not, "sudo port install" or "sudo port upgrade" (without port name)
>> or "sudo port install subport=unbound" should take the port from the
>> current dir, 
> 
> I edited the Portfile /Users/sysbh/MacPortsDev/macports-port/net/nsd/Portfile 
> again, set the revision to 6 and ran ’sudo port install’ while in directory 
> /Users/sysbh/MacPortsDev/macports-port/net/nsd and this worked.
> 
>> but "sudo port install unbound" will probably take the
>> one that's configured globally and returned by "port dir unbound”.
> 
> That seems to be the case.
> 
> Albus:nsd sysbh$ pwd
> /Users/sysbh/MacPortsDev/macports-ports/net/nsd
> Albus:nsd sysbh$ port dir
> /Users/sysbh/MacPortsDev/macports-ports/net/nsd
> Albus:nsd sysbh$ port dir nsd
> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/nsd
>  
> 
> So, if you give the name of the port, it will use the main repository. You 
> need to explicitly not give the name to get the local Portfile. This is 
> somewhat surprising behaviour (for me at last) that I have to leave out the 
> name of the thing to get the thing.
> 
> Now, the only thing I have to do is to find a way to get my local revision 
> back to 1, before I submit the patch. I have installed
> 
> Albus:nsd sysbh$ port installed
> The following ports are currently installed:
>   expat @2.2.7_0 (active)
>   flex @2.6.4_0 (active)
>   gettext @0.19.8.1_2 (active)
>   libevent @2.1.10_0 (active)
>   libiconv @1.16_0 (active)
>   m4 @1.4.18_2 (active)
>   ncurses @6.1_0 (active)
>   nsd @4.1.22_0
>   nsd @4.1.22_1
>   nsd @4.2.1_0
>   nsd @4.2.1_1
>   nsd @4.2.1_2
>   nsd @4.2.1_3
>   nsd @4.2.1_5
>   nsd @4.2.1_6 (active)
>   openssl @1.0.2s_0 (active)
>   unbound @1.9.2_0
>   unbound @1.9.2_1 (active)
>   zlib @1.2.11_0 (active)
> 
> If my update gets accepted, that would mean it would be revision 6. Is that 
> bad? The revisions all come from my local tinkering because I know not how to 
> force a build without changing revision.
> 
> I also want to clean up my installed versions. So nsd becomes
> 
>   nsd @4.2.1_0
>   nsd @4.2.1_1 (active)
> 
> with that last one actually the current revision 6. How do I do that?
> 
> G
> 
> 
>> 
>> Mojca



smime.p7s
Description: S/MIME cryptographic signature


Re: What am I forgetting?

2019-08-13 Thread Gerben Wierda
Thanks Mojca,

> On 13 Aug 2019, at 03:22, Mojca Miklavec  wrote:
> 
> On Tue, 13 Aug 2019 at 01:24, Gerben Wierda  wrote:
>> 
>> I have my own cloud git directory tree
>> I cd to $thattree/net/unbound
>> I edit the Portfile (startupitem), set revision to 1 (there was no revision)
>> I run sudo port install unbound
>> It is not built and installed as nothing has changed (but there has)
>> 
>> What am I forgetting?
> 
> Did you add your local git checkout to configuration as your local
> repository with higher preference?
>https://guide.macports.org/chunked/development.local-repositories.html
> Check this with
>port dir unbound

I did edit sources.conf. It contains:

file:///Users/sysbh/MacPortsDev
rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]

But whatever is in there, port dir unbound gets met the standard repository.

Albus:nsd sysbh$ port dir unbound
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/unbound

So, als with

file:///Users/sysbh/MacPortsDev/macports-port
rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]


> If not, "sudo port install" or "sudo port upgrade" (without port name)
> or "sudo port install subport=unbound" should take the port from the
> current dir,

I edited the Portfile /Users/sysbh/MacPortsDev/macports-port/net/nsd/Portfile 
again, set the revision to 6 and ran ’sudo port install’ while in directory 
/Users/sysbh/MacPortsDev/macports-port/net/nsd and this worked.

> but "sudo port install unbound" will probably take the
> one that's configured globally and returned by "port dir unbound”.

That seems to be the case.

Albus:nsd sysbh$ pwd
/Users/sysbh/MacPortsDev/macports-ports/net/nsd
Albus:nsd sysbh$ port dir
/Users/sysbh/MacPortsDev/macports-ports/net/nsd
Albus:nsd sysbh$ port dir nsd
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/nsd

So, if you give the name of the port, it will use the main repository. You need 
to explicitly not give the name to get the local Portfile. This is somewhat 
surprising behaviour (for me at last) that I have to leave out the name of the 
thing to get the thing.

Now, the only thing I have to do is to find a way to get my local revision back 
to 1, before I submit the patch. I have installed

Albus:nsd sysbh$ port installed
The following ports are currently installed:
  expat @2.2.7_0 (active)
  flex @2.6.4_0 (active)
  gettext @0.19.8.1_2 (active)
  libevent @2.1.10_0 (active)
  libiconv @1.16_0 (active)
  m4 @1.4.18_2 (active)
  ncurses @6.1_0 (active)
  nsd @4.1.22_0
  nsd @4.1.22_1
  nsd @4.2.1_0
  nsd @4.2.1_1
  nsd @4.2.1_2
  nsd @4.2.1_3
  nsd @4.2.1_5
  nsd @4.2.1_6 (active)
  openssl @1.0.2s_0 (active)
  unbound @1.9.2_0
  unbound @1.9.2_1 (active)
  zlib @1.2.11_0 (active)

If my update gets accepted, that would mean it would be revision 6. Is that 
bad? The revisions all come from my local tinkering because I know not how to 
force a build without changing revision.

I also want to clean up my installed versions. So nsd becomes

  nsd @4.2.1_0
  nsd @4.2.1_1 (active)

with that last one actually the current revision 6. How do I do that?

G


> 
> Mojca



Re: To root or not to root?

2019-08-13 Thread Christopher Jones


> On 12 Aug 2019, at 9:40 pm, Gerben Wierda  wrote:
> 
> As I’m working my way to somewhat knowing what I’m doing, I have a question.
> 
> I always set the timeout on sudo on my systems to 0 seconds. So, for every 
> sudo command I enter, I have to type the password. This is somewhat safer 
> than having a timeout (normally 300sec).

What I do is allow ${prefix}/bin/port to run through sudo without requiring a 
password. you can do this by adding

chris   ALL=(ALL) NOPASSWD: /opt/local/bin/port

this in my opinion has two advantages

1. I never have to type my passport for running port
2. Because of 1., sudo never fully authenticates, so if I was to run another 
command through sudo immediately after port, that command will ask for my 
password.

In my view, the above is more convenient, and also safer against my accidental 
bad usage of sudo.

Chris

> 
> This becomes tedious when there are many sudo commands to perform, so in that 
> case, I often revert to running sudo -s or sudo -i, do my work as root and 
> kill the subshell. This has risks too (e.g. doing a wrong rm command, but I’m 
> pretty paranoiac about stuff like rm)
> 
> For my first steps with macports, I’ve run everything as root that way, 
> because I expected there would be changes in /Library/LaunchDaemons etc and I 
> did not want toe be typing my password all the time.
> 
> But I’m wondering if I should move back to running everything as ordinary 
> user.
> 
> Are there disadvantages to running to port commands as root?
> 
> If I want to revert, what should I chown to that user? How should ownership 
> in /opt be?
> 
> Gerben Wierda
> Chess and the Art of Enterprise Architecture 
> Mastering ArchiMate 
> Architecture for Real Enterprises 
>  at 
> InfoWorld
> On Slippery Ice  at EAPJ
> 



smime.p7s
Description: S/MIME cryptographic signature