Re: Xcode PortGroup: Xcode compiles code twice?
On Tue, 15 Aug 2023, Jason Liu wrote: Yes, you're right that clearing the build phase doesn't prove anything, but I'm not sure I'm following your other point. Are you saying that "make install" will compile the source code? I was under the impression that you need to manually run "make" in order to actually compile the source code, hence the traditional magic formula of './configure ; make ; make install'. Without the first make, the "make install" shouldn't have anything to install. Or am I wrong about that? Normally, "make install" implies "make" via dependencies, since with properly constructed dependencies, make will notice that it's trying to install something that hasn't been built, and correct that. The main advantage of doing them separately is that "make" doesn't require sudo, while "make install" usually does. If you skip the separate "make" without sudo, then the implied build products wind up owned by root, and even "make clean" requires sudo. Fred Wright
Re: Xcode PortGroup: Xcode compiles code twice?
Yes, you're right that clearing the build phase doesn't prove anything, but I'm not sure I'm following your other point. Are you saying that "make install" will compile the source code? I was under the impression that you need to manually run "make" in order to actually compile the source code, hence the traditional magic formula of './configure ; make ; make install'. Without the first make, the "make install" shouldn't have anything to install. Or am I wrong about that? -- Jason Liu On Tue, Aug 15, 2023 at 2:54 PM Joshua Root wrote: > On 16/8/2023 04:29, Jason Liu wrote: > > Hi everyone, > > > > I'm working on a Portfile that uses the xcode PortGroup, and I've > > noticed something that surprised me: It seems that the MacPorts build is > > compiling the source code during the build phase, and then compiling the > > source code AGAIN during the destroot phase? Is this correct, or am I > > starting to hallucinate? Because when I add a 'build {}' to my Portfile, > > which in theory should cause nothing to be compiled, all of the compiled > > products are still somehow coming into existence and getting placed into > > ${destroot}. > > I don't know if your project is in fact building things twice, but > clearing the build phase doesn't prove anything one way or the other, > because the install target depends on the targets that build the program > and will thus run them first. You will usually see a similar thing > happen if you just run 'make install' with a makefile based project. > > - Josh >
Re: Xcode PortGroup: Xcode compiles code twice?
On 16/8/2023 04:29, Jason Liu wrote: Hi everyone, I'm working on a Portfile that uses the xcode PortGroup, and I've noticed something that surprised me: It seems that the MacPorts build is compiling the source code during the build phase, and then compiling the source code AGAIN during the destroot phase? Is this correct, or am I starting to hallucinate? Because when I add a 'build {}' to my Portfile, which in theory should cause nothing to be compiled, all of the compiled products are still somehow coming into existence and getting placed into ${destroot}. I don't know if your project is in fact building things twice, but clearing the build phase doesn't prove anything one way or the other, because the install target depends on the targets that build the program and will thus run them first. You will usually see a similar thing happen if you just run 'make install' with a makefile based project. - Josh
Xcode PortGroup: Xcode compiles code twice?
Hi everyone, I'm working on a Portfile that uses the xcode PortGroup, and I've noticed something that surprised me: It seems that the MacPorts build is compiling the source code during the build phase, and then compiling the source code AGAIN during the destroot phase? Is this correct, or am I starting to hallucinate? Because when I add a 'build {}' to my Portfile, which in theory should cause nothing to be compiled, all of the compiled products are still somehow coming into existence and getting placed into ${destroot}. -- Jason Liu
accessing $argv0 from Portfile?
Hi, Is there a way to get the path to MacPort's tclsh interpreter from within a Portfile, other than by using a `glob` to find it in $prefix/libexec/macports/bin ? (not to do anything naughty, just to run a Tcl test/benchmark.)
Re: Why some ports seem to install universal when I do not request it ?
Hi, Thanks, eventually I figured that out for myself as well. I didn’t appreciate that if a port indicated it didn’t support arm, the x86_64 would be installed instead and used via rosetta etc. nice. I have though already found a number of ports I use indicate they only support x86_64 but this seems unnecessary as remove it they build fine for arm64, so can be removed. cheers Chris > On 15 Aug 2023, at 5:59 am, Joshua Root wrote: > > On 15/8/2023 05:06, Christopher Jones wrote: >> Hi All, >> Just migrated from an intel to AppleSilicon machine. >> Reinstalling MacPOrts, from scratch off course, I’ve noticed some ports get >> install universal, when it’s not something I have requested. e.g. >> ---> Fetching archive for zlib >> ---> Attempting to fetch >> zlib-1.2.13_0+universal.darwin_22.arm64-x86_64.tbz2 from >> https://packages.macports.org/zlib >> ---> Attempting to fetch >> zlib-1.2.13_0+universal.darwin_22.arm64-x86_64.tbz2.rmd160 from >> https://packages.macports.org/zlib >> ---> Installing zlib @1.2.13_0+universal >> ---> Cleaning zlib >> ---> Deactivating zlib @1.2.13_0 >> ---> Cleaning zlib >> ---> Activating zlib @1.2.13_0+universal >> zlib has a universal port, but its not a default one, and I didn’t request >> it, nor have I ever set my default settings to always install universal. >> As I am new to apple silicon machines, is this normal ? > > Most likely you installed a port that supports x86_64 but not arm64. The > behaviour is the same as as when you install a port that only supports i386 > on an x86_64 system. > > - Josh