Closed DSPerson closed 2 years ago
can you help me?
this is sh content
# search through build logs, most recent first
cd "/Users/zuiyou/Library/Developer/Xcode/DerivedData/MAGA-dpsgcoadfiawyggstyjrwvpulung/Logs/Build" &&
for log in `ls -t *.xcactivitylog`; do
#echo "Scanning $log"
/usr/bin/env perl "/Users/zuiyou/Library/Developer/CoreSimulator/Devices/1AB498A6-489F-4328-B6FB-69A6ADD74227/data/Containers/Data/Application/D09A8D95-515C-4B24-98C8-9C8EFC6408FE/tmp/eval101.pl" "$log" >"/Users/zuiyou/Library/Developer/CoreSimulator/Devices/1AB498A6-489F-4328-B6FB-69A6ADD74227/data/Containers/Data/Application/D09A8D95-515C-4B24-98C8-9C8EFC6408FE/tmp/eval101.sh" 2>"/Users/zuiyou/Library/Developer/CoreSimulator/Devices/1AB498A6-489F-4328-B6FB-69A6ADD74227/data/Containers/Data/Application/D09A8D95-515C-4B24-98C8-9C8EFC6408FE/tmp/eval101.err" && exit 0
done
exit 1;
Hi, can I get back to you on this later. I can't think of anything obvious. Have you tried a simpler project first to get started? Try looking at the script it mentions and the Perl script it calls to see if there is anything more you can tell me? You can run it from the command line and try to work out what the problem is by seeing if it returns status 0 or 1 (echo $?)
first question:
simple project it works;
but in my project it not work, I tried all README functions.......
like this?
output:
Can you send me the Perl script it calls or post it here to see if I can spot something. It's may be a character set issue though I don't see from the fileppath what the problem would be. Also, if you could export the project build logs using export on the build tab and send them though to GitHub at johnholdsworth.com I could take a look.
Can you send me the Perl script it calls or post it here to see if I can spot something. It's may be a character set issue though I don't see from the fileppath what the problem would be. Also, if you could export the project build logs using export on the build tab and send them though to GitHub at johnholdsworth.com I could take a look.
Thank you very much for your reply. but i'm sorry, i don't understand how to call perl script. I never use it, even listen it. Maybe you can teach me how to perform it. Thanks.
In the command.sh it mentions, it calls a Perl script (.pl). Can you send me the Perl script thanks or post it here.
# search through build logs, most recent first
cd "/Users/zuiyou/Library/Developer/Xcode/DerivedData/MAGA-dpsgcoadfiawyggstyjrwvpulung/Logs/Build" &&
for log in `ls -t *.xcactivitylog`; do
#echo "Scanning $log"
/usr/bin/env perl "/Users/zuiyou/Library/Developer/CoreSimulator/Devices/1AB498A6-489F-4328-B6FB-69A6ADD74227/data/Containers/Data/Application/5ABB292F-CCE0-4BAE-BA8F-673BB7E1C148/tmp/eval101.pl" "$log" >"/Users/zuiyou/Library/Developer/CoreSimulator/Devices/1AB498A6-489F-4328-B6FB-69A6ADD74227/data/Containers/Data/Application/5ABB292F-CCE0-4BAE-BA8F-673BB7E1C148/tmp/eval101.sh" 2>"/Users/zuiyou/Library/Developer/CoreSimulator/Devices/1AB498A6-489F-4328-B6FB-69A6ADD74227/data/Containers/Data/Application/5ABB292F-CCE0-4BAE-BA8F-673BB7E1C148/tmp/eval101.err" && exit 0
done
exit 1;
use JSON::PP;
use English;
use strict;
$INPUT_RECORD_SEPARATOR = "\r";
open GUNZIP, "/usr/bin/gunzip <\"$ARGV[0]\" 2>/dev/null |" or die;
my ($realPath, $command);
while (defined (my $line =
# may need to extract file list
if ($line =~ / -filelist /) {
while (defined (my $line2 = <GUNZIP>)) {
if (my($filemap) = $line2 =~ / -output-file-map ([^ \\]+(?:\\.[^ \\]+)*) / ) {
$filemap =~ s/\\//g;
my $file_handle = IO::File->new( "< $filemap" )
or die "Could not open filemap '$filemap'";
my $json_text = join'', $file_handle->getlines();
my $json_map = decode_json( $json_text, { utf8 => 1 } );
my $filelist = '/Users/zuiyou/Library/Developer/CoreSimulator/Devices/1AB498A6-489F-4328-B6FB-69A6ADD74227/data/Containers/Data/Application/5ABB292F-CCE0-4BAE-BA8F-673BB7E1C148/tmp//filelist.txt';
my $swift_sources = join "\n", keys %$json_map;
my $listfile = IO::File->new( "> $filelist" )
or die "Could not open list file '$filelist'";
binmode $listfile, ':utf8';
$listfile->print( $swift_sources );
$listfile->close();
$line =~ s/( -filelist )([^ \\]*(?:\\.[^ \\]*)*)( )/$1$filelist$3/;
last;
}
}
}
if ($realPath and (undef, $realPath) = $realPath =~ /cd (\"?)(.*?)\1\r/) {
}
# find last
$command = $line
#exit 0;
}
}
if ($command) { print $command; exit 0; }
exit 1;
3. eval101.sh and eval101.err
they are all empty
> last i found `$filelist` has two `/`, is it error reason?
Thanks for sending that through. Can you go to the Xcode build tab of your project, click the export button and send the resulting file through to me please - github at johnholdsworth.com
Thanks for yore reply. I sent you mail
Thanks for sending that through. InjectionIII relies on being able to see how files are compiled from these build logs. For some reason the log you sent through doesn't contain any compilations that I would expect. Are you using Bazel or some other build system? Until your build log contains the compilation commands,InjectionIII can not work.
I just click Xcode run
Yes, but how is the project configured. If you are using the Xcode build system there should be a lot of compile commands in the log. Without them you will get this error.
I clean my Xcode, and i rebuild, i will send you soon
OK, got it. There is still something about your Xcode configuration I've not encountered before. It is not logging. the actual compile command but instead something which is no use to InjectionIII like this:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend @/var/folders/nm/wz3rck2521dbkrdpy12t6w440000gp/T/TemporaryDirectory.n6ijyQ/arguments-6374883059988158360.resp
Please check your build settings and check if you have anything unusual set. Is this a very, very large project?
Does the file /var/folders/nm/wz3rck2521dbkrdpy12t6w440000gp/T/TemporaryDirectory.n6ijyQ/arguments-6374883059988158360.resp still exist?
No... it is temp file.
You won't be able to use use injection on this project as it stands. Can you email its .xcodeproj file?
Have tried adding build parameter SWIFT_ENABLE_BATCH_MODE = NO?
Have tried adding build parameter SWIFT_ENABLE_BATCH_MODE = NO? Wait, I try once;
Have tried adding build parameter SWIFT_ENABLE_BATCH_MODE = NO?
it not work.
You won't be able to use use injection on this project as it stands. Can you email its .xcodeproj file?
I had sent xxx.xcodeproj.zip to you.
Thanks for sending the project through. I can't see anything particular part from the sheer size of the project. Until you find a way to avoid these ".resp" temporary files in the logs instead of the full compiler command, I'm sorry but, there isn't much I can do.
@DSPerson are you running this on devices or simulators?
One more thing to check, did you turn off bitcode for your targets? At the same time have you added the necessary linker flags as well?
Recently we found that InjectionIII won't work with whole-module optimization
and bitcode
, so you have to turn off both whole-module optimization
and bitcode
.
@DSPerson are you running this on devices or simulators?
One more thing to check, did you turn off bitcode for your targets? At the same time have you added the necessary linker flags as well?
Recently we found that InjectionIII won't work with
whole-module optimization
andbitcode
, so you have to turn off bothwhole-module optimization
andbitcode
.
Thanks, but I turn off bitcode
and had add SWIFT-WHOLE-MODULE-OPTIMIZATION
in Xcode User-Defined
Until you find a way to avoid these ".resp" temporary files in the logs instead of the full compiler command
alright, Maybe i should give up. ┭┮﹏┭┮
Sorry, let me know if you ever work out what the problem was here. I've never seen this before except perhaps something related to Bazel??
xcode 13.3 injection: 4.26 compilation mode: singlefile