Hello
Already last december I was ablt to build TextMate on a M1 MacBook (I shared this with Michael Sheets) but at the time and still now I encounter some errors during the build. For instance
FAILED: /Users/mocenigo/build/textmate/release/Applications/TextMate/TextMate.app/Contents/Resources/English.lproj/GrammarProperties.nib
/bin/cp -Xp /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib /Users/mocenigo/build/textmate/release/Applications/TextMate/TextMate.app/Contents/Resources/English.lproj/GrammarProperties.nib && touch /Users/mocenigo/build/textmate/release/Applications/TextMate/TextMate.app/Contents/Resources/English.lproj/GrammarProperties.nib
cp: /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib is a directory (not copied).
ninja: build stopped: subcommand failed.
Now, if i continue to issue the command "ninja TextMate" it will eventually build and sign a working application. But this should not happen, I guess.
How can I set up the environment to just build properly, with "ninja TextMate" and not stopping on the cp commands?
Roberto
On 20 May 2021, at 15:16, Roberto Avanzi via TextMate wrote:
[…] cp: /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib is a directory (not copied). […]
How can I set up the environment to just build properly, with "ninja TextMate" and not stopping on the cp commands?
This is puzzling because in the above, `GrammarProperties.nib` should *not* be a directory.
It is created from the `GrammarProprties.xib` using `xcrun ibtool --compile`.
You can try to experiment with `ibtool` yourself, for example, the man page for this tool says the following:
--flatten boolean When combined with the --compile option and a value of NO, --flatten instructs ibtool to produce an output file that is both runnable, and editable. This option is typically used when preparing a product for localization. If no value is specified, the default flattening option is YES.
It *might* be that `--flatten` defaults to `NO` in your build environment, and that causes a directory to be created?
Btw: If you are only doing your own builds to get ARM support then current release builds are universal.
Well, this is indeed puzzling. I have installed the required tools using brew, so on an M1 mac they go to /opt/homebrew
Starting from scratch, i..e removing my textmate git repo copy and the build directory, I first issue
git clone --recursive https://github.com/textmate/textmate.git cd textmate ./configure
and of course ./configure complains with
*** dependency missing: ‘/usr/local/include/boost/crc.hpp’.
so I replace /usr/local with /opt/homebrew (also in default.rave) and retry - no error. In order to avoid other errors regarding include files not found, I also add "-I/opt/homebrew/include" to all compiler flags, it does not gurt.
Then I try to build TextMate and:
[25/931] Xib ‘Frameworks/BundleEditor/resources/English.lproj/SharedProperties.xib’…
/* com.apple.ibtool.document.notices */
/Users/mocenigo/Source/textmate/Frameworks/BundleEditor/resources/English.lproj/SharedProperties.xib:88: note: NSTextField's height does not match its intrinsic content size, use "Size to Fit Content" to correct [22] /Users/mocenigo/Source/textmate/Frameworks/BundleEditor/resources/English.lproj/SharedProperties.xib:128: note: NSTextField's height does not match its intrinsic content size, use "Size to Fit Content" to correct [22] /Users/mocenigo/Source/textmate/Frameworks/BundleEditor/resources/English.lproj/SharedProperties.xib:84: note: NSTextField's height does not match its intrinsic content size, use "Size to Fit Content" to correct [22] /Users/mocenigo/Source/textmate/Frameworks/BundleEditor/resources/English.lproj/SharedProperties.xib:92: note: View is clipping its content [13]
and later several errors like
[351/931] Copy ‘/Users/mocenigo/build/textmate/release/_CompileXib/...rks/BundleEditor/resources/English.lproj/FileDropProperties.nib’…
FAILED: /Users/mocenigo/build/textmate/release/Applications/TextMate/TextMate.app/Contents/Resources/English.lproj/FileDropProperties.nib
/bin/cp -Xp /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/FileDropProperties.nib /Users/mocenigo/build/textmate/release/Applications/TextMate/TextMate.app/Contents/Resources/English.lproj/FileDropProperties.nib && touch /Users/mocenigo/build/textmate/release/Applications/TextMate/TextMate.app/Contents/Resources/English.lproj/FileDropProperties.nib
cp: /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/FileDropProperties.nib is a directory (not copied).
So I am not sure what this happens.
The reason I want to compile it myself is because i really like the editor (I also acquired a license! so it is not to remove the check!) and being able to build stuff myself in these case is a kind of insurance against developers stopping their work, and the need to adapt to more recent OS versions and so on. I like to do it for as much stuff as possible. Indeed, Michael Sheets confirmed to me that when I told him I managed to get it working on my M1 MB Air, you guys had not done that yet because you did not have the hardware ;-)
Returning to the question: why is the ibtool failing and I get a directory?
Roberto
On Mon, May 24, 2021 at 11:30 AM Allan Odgaard via TextMate textmate@lists.macromates.com wrote:
On 20 May 2021, at 15:16, Roberto Avanzi via TextMate wrote:
[…] cp: /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib is a directory (not copied). […]
How can I set up the environment to just build properly, with "ninja TextMate" and not stopping on the cp commands?
This is puzzling because in the above, GrammarProperties.nib should not be a directory.
It is created from the GrammarProprties.xib using xcrun ibtool --compile.
You can try to experiment with ibtool yourself, for example, the man page for this tool says the following:
--flatten boolean When combined with the --compile option and a value of NO, --flatten instructs ibtool to produce an output file that is both runnable, and editable. This option is typically used when preparing a product for localization. If no value is specified, the default flattening option is YES.
It might be that --flatten defaults to NO in your build environment, and that causes a directory to be created?
Btw: If you are only doing your own builds to get ARM support then current release builds are universal.
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
I cannot find where the system makes --flatten default to NO, but I modified method transform in class CompileXib as follows
def transform(file, config, builddir) super.merge( flags: config['IB_FLAGS'], command: 'xcrun ibtool --compile $out $flags --flatten YES $in', description: 'Xib ‘${in}’…', dependencies: config.dig(:inference, 'IB_FLAGS'), ) end
and now, instead of failing on several of these .nib files/directories, it fails only on two of them: GrammarProperties.nib and FileDropProperties.nib. As a result I cannot open the Bundle Editor.
As a result files /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/FileDropProperties.nib and /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib are in fact packages and not files, and they both contain two files inside, called keyedobjects-110000.nib and keyedobjects,.nib
Very confused now.
Roberto
On Mon, May 24, 2021 at 11:30 AM Allan Odgaard via TextMate textmate@lists.macromates.com wrote:
On 20 May 2021, at 15:16, Roberto Avanzi via TextMate wrote:
[…] cp: /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib is a directory (not copied). […]
How can I set up the environment to just build properly, with "ninja TextMate" and not stopping on the cp commands?
This is puzzling because in the above, GrammarProperties.nib should not be a directory.
It is created from the GrammarProprties.xib using xcrun ibtool --compile.
You can try to experiment with ibtool yourself, for example, the man page for this tool says the following:
--flatten boolean When combined with the --compile option and a value of NO, --flatten instructs ibtool to produce an output file that is both runnable, and editable. This option is typically used when preparing a product for localization. If no value is specified, the default flattening option is YES.
It might be that --flatten defaults to NO in your build environment, and that causes a directory to be created?
Btw: If you are only doing your own builds to get ARM support then current release builds are universal.
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
On 24 May 2021, at 14:57, Roberto Avanzi wrote:
I cannot find where the system makes --flatten default to NO, but I modified method transform in class CompileXib as follows
This could simply be Apple that changed the default behavior for latest Xcode (I am still building on macOS 10.15).
and now, instead of failing on several of these .nib files/directories, it fails only on two of them: GrammarProperties.nib and FileDropProperties.nib. As a result I cannot open the Bundle Editor.
As a result files /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/FileDropProperties.nib and /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib are in fact packages and not files, and they both contain two files inside, called keyedobjects-110000.nib and keyedobjects,.nib
Try to delete these files (folders) and re-run the build. It could be, that they were created before you added the `--flatten YES` option.
If it then works, I will make `--flatten YES` default.
Also, I didn’t know about `/opt/homebrew`, presumably this was also a change made for macOS 11, I can probably improve `./configure` to pick this up.
Allan, Homebrew puts the ARM copy of itself in /opt/Homebrew, the Intel copy, it still mangles /usr/local like it owns it.
On Mon, May 24, 2021, at 6:02 AM, Allan Odgaard via TextMate wrote:
On 24 May 2021, at 14:57, Roberto Avanzi wrote:
I cannot find where the system makes --flatten default to NO, but I modified method transform in class CompileXib as follows
This could simply be Apple that changed the default behavior for latest Xcode (I am still building on macOS 10.15).
and now, instead of failing on several of these .nib files/directories, it fails only on two of them: GrammarProperties.nib and FileDropProperties.nib. As a result I cannot open the Bundle Editor.
As a result files /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/FileDropProperties.nib and /Users/mocenigo/build/textmate/release/_CompileXib/Frameworks/BundleEditor/resources/English.lproj/GrammarProperties.nib are in fact packages and not files, and they both contain two files inside, called keyedobjects-110000.nib and keyedobjects,.nib
Try to delete these files (folders) and re-run the build. It could be, that they were created before you added the `--flatten YES` option.
If it then works, I will make `--flatten YES` default.
Also, I didn’t know about `/opt/homebrew`, presumably this was also a change made for macOS 11, I can probably improve `./configure` to pick this up.
TextMate mailing list -- textmate@lists.macromates.com mailto:textmate%40lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com mailto:textmate-leave%40lists.macromates.com
On 24 May 2021, at 15:02, Allan Odgaard via TextMate textmate@lists.macromates.com wrote: Also, I didn’t know about /opt/homebrew, presumably this was also a change made for macOS 11, I can probably improve ./configure to pick this up.
No, it’s Apple Silicon specific. I presume it’s to be able to install the Intel and Apple Silicon versions side by side. But yes, it would be good to be able to pick up the new location.
Allan, I can give you my changes in more detail, also directly, just write me at roberto dot avanzi at the-google-free-email-service dot com
On Mon, May 24, 2021 at 7:40 PM Jacob Carlborg via TextMate textmate@lists.macromates.com wrote:
On 24 May 2021, at 15:02, Allan Odgaard via TextMate textmate@lists.macromates.com wrote:
Also, I didn’t know about /opt/homebrew, presumably this was also a change made for macOS 11, I can probably improve ./configure to pick this up.
No, it’s Apple Silicon specific. I presume it’s to be able to install the Intel and Apple Silicon versions side by side. But yes, it would be good to be able to pick up the new location.
-- /Jacob Carlborg
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com