/bin/sh: : No such file or directory Splunk MINT SDK - ios

I am implementing BugSense using link http://docs.splunk.com/Documentation/MintIOSSDK/latest/DevGuide/Configureyourprojectforsymbolication
I have added the script for Configure server-side symbolication
SCRIPT=/usr/bin/find "${SRCROOT}" -name splunkmint_postbuild_dsym_upload_script.sh | head -n 1
/bin/sh "${SCRIPT}" "API_KEY" "API_TOKEN"
but when i am compiling my project xcode gives
/bin/sh: : No such file or directory

I got the solution.
I did't add SplunkMint.framework properly its was only referenced but not present in bundle.After adding referenced SplunkMint.framework in bundle I set the flag "-ObjC" and "-all_load" in other linker flag(In build setting) then compile.
Now its working fine.

Related

How to fix meson generating an incorrect linker flag (--subsystem console)

I've created a simple project to get myself accustomed to meson, but the build keeps failing.
This is what I did (to set up the environment, and to build):
set CC=clang
set CC_LD=lld
set CFLAGS="--target x86_64-pc-windows-msvc"
meson build
cd build
ninja
My meson.build is as follows:
project('EtaClient', 'c')
src = ['src/main.c', 'src/linkedlist.c']
executable('EtaClient', src)
target = 'x86_64-pc-windows-msvc'
While building, I get the following errors (the obj files are built successfully, but they're not linked and thus the exe isn't built):
LINK : warning LNK4044: unrecognized option '/-subsystem'; ignored
LINK : fatal error LNK1181: cannot open input file 'console.obj'
clang: error: linker command failed with exit code 1181 (use -v to see invocation)
When I look in my build.ninja to see what's going on, I find:
build EtaClient.exe | EtaClient.pdb: c_LINKER EtaClient.exe.p/src_main.c.obj EtaClient.exe.p/src_linkedlist.c.obj
LINK_ARGS = "-Wl,/nologo" "-Wl,/release" "-Wl,/nologo" "-Wl,/DEBUG" "-Wl,/PDB:EtaClient.pdb" "-Wl,--subsystem,console" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-ladvapi32"
I replace "-Wl,--subsystem,console" with "-Wl,/subsystem:console", and the build compiles successfully, but I have to manually make this edit each time I modify my meson.build.
Could someone tell me why this happens, and how to set up meson to generate the correct flag?
Thanks in advance.
use clang-cl instead of clang and leave out the defintion of the linker when you are on windows
set CC=clang-cl
set CFLAGS="--target x86_64-pc-windows-msvc"
meson build
cd build
ninja
see
https://github.com/mesonbuild/meson/issues/4232

Gluon Mobile GraalVM iOS 14.1

Since I’ve updated Xcode to version 12.2 because of update iOS to 14.1 I’m not able to build my Gluon Mobile project. An error occurs at the end of the build process by linking. I saw that the object files. They are created but not linked.
Object file folder :
.../target/client/arm64-ios/gvm/tmp/SVM-1605296582688/llvm
I’ve tried to link only and got following errors in .../GraalVMGluonSample/target/client/log :
Process
=======
link
Command Line
============
clang /Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/Hello Gluon/AppDelegate.o /Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/tmp/SVM-1605296582688/com.GraalVMgluonsample.GraalVMgluonsample.o /Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/tmp/SVM-1605296582688/llvm/llvm.o -ljava -lnio -lzip -lnet -lprefs -ljvm -lfdlibm -lz -ldl -lj2pkcs11 -lsunec -ljaas -lextnet -lstdc++ -w -fPIC -arch arm64 -mios-version-min=11.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.1.sdk -Wl,-force_load,/Users/kojojo/.gluon/substrate/javafxStaticSdk/15-ea+gvm22/ios-arm64/sdk/lib/libprism_es2.a -Wl,-force_load,/Users/kojojo/.gluon/substrate/javafxStaticSdk/15-ea+gvm22/ios-arm64/sdk/lib/libglass.a -Wl,-force_load,/Users/kojojo/.gluon/substrate/javafxStaticSdk/15-ea+gvm22/ios-arm64/sdk/lib/libjavafx_font.a -Wl,-force_load,/Users/kojojo/.gluon/substrate/javafxStaticSdk/15-ea+gvm22/ios-arm64/sdk/lib/libprism_common.a -Wl,-force_load,/Users/kojojo/.gluon/substrate/javafxStaticSdk/15-ea+gvm22/ios-arm64/sdk/lib/libjavafx_iio.a -lpthread -llibchelper -lffi -ldarwin -Wl,-framework,Foundation -Wl,-framework,UIKit -Wl,-framework,CoreGraphics -Wl,-framework,MobileCoreServices -Wl,-framework,OpenGLES -Wl,-framework,CoreText -Wl,-framework,QuartzCore -Wl,-framework,ImageIO -Wl,-framework,CoreBluetooth -Wl,-framework,CoreImage -Wl,-framework,CoreLocation -Wl,-framework,CoreMedia -Wl,-framework,CoreMotion -Wl,-framework,CoreVideo -Wl,-framework,Accelerate -Wl,-framework,AVFoundation -Wl,-framework,AudioToolbox -Wl,-framework,MediaPlayer -Wl,-framework,UserNotifications -Wl,-framework,ARKit -Wl,-framework,AVKit -Wl,-framework,SceneKit -Wl,-framework,StoreKit -o /Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/Hello Gluon.app/Hello Gluon -L/Users/kojojo/.gluon/substrate/javafxStaticSdk/15-ea+gvm22/ios-arm64/sdk/lib -L/opt/graalvm/lib/svm/clibraries/ios-arm64 -L/Users/kojojo/.gluon/substrate/javaStaticSdk/11-ea+1/ios-arm64/labs-staticjdk/lib/static -L/Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/lib -Wl,-force_load,/Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/lib/libLifecycle.a -Wl,-force_load,/Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/lib/libStatusbar.a -Wl,-force_load,/Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/lib/libDisplay.a -Wl,-force_load,/Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/lib/libUtil.a -Wl,-force_load,/Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/lib/libStorage.a
Output
======
ld: building for iOS, but linking in object file built for macOS, file '/Users/kojojo/NetBeansProjects/GraalVMGluonSample/target/client/arm64-ios/gvm/tmp/SVM-1605296582688/llvm/llvm.o'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Result
======
result: 1
I upgraded the plugin <client.plugin.version>0.1.34</client.plugin.version> and then I folowed the instruction in the error message. I installed graalvm-ce-java11-20.2.0.hotfix-xcode12.zip and changed GRAALVM_HOME but anyway I get error during build :
Process
=======
compile
Command Line
============
/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.2.0.hotfix-xcode12/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+ExitAfterRe$
Output
======
env: bash: No such file or directory
Result
======
result: 127
I noticed that the structure of the graalvm-ce-java11-20.2.0.hotfix-xcode12.zip is different than a regular relaese 20.2.0. It doesn‘t contain /Contents/Home folders. Can it cause an issue?
There is a solution based on the hints from José Pereda:
Upgrade Gluon Client Plugin in pom.xml <client.plugin.version>0.1.34</client.plugin.version>
Build your project. You will get a message with the instruction to upgrade GraalVM. Download graalvm-ce-java11-20.2.0.hotfix-xcode12.zip (Link is in the message)
Unpack the zip file move to /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.2.0.hotfix-xcode12
Set environment variable GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.2.0.hotfix-xcode12
Check if environment variable PATH contains at least 
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

'warning: directory not found for option' error on build

All of a sudden my app has started giving me an error when I try to build it. This is the error I'm getting:
ld: warning: directory not found for option '-L/Users/user/Documents/Developer/Alton-Towers-Times/build/Debug-iphoneos'
ld: file too small (length=0) file '/Users/user/Library/Developer/Xcode/DerivedData/Mouse_Times_Florida-eqhrhnbxmmkxtahdghmnvehbzbgt/Build/Intermediates/Mouse Times Florida.build/Debug-iphonesimulator/Mouse Times Florida WatchKit Extension.build/Objects-normal/x86_64/SecondInterfaceController.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Only thing I've really done since I last managed to get it to run was changing the bundle IDs and I also changed the app name. I've tried a few things including deleting the derived data, but nothing seems to have helped.
Anyone have any ideas?
I solved this warning removing the following setting: "$(SDKROOT)/Developer/Library/Frameworks"
This options is located in Settings -> Build Settings -> Search Paths -> Framework Search Paths
Setting location
My project continues compiling and working fine, after removing this option.
Veladan answer helped me to sort out that issue on an iOS8 project freshly migrated to iOS9.
This worked fine on the main target of my project, but the warning lasted on the unit tests target, so in the end I edited directly the project.pbxproj file and modified the entries :
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
to :
FRAMEWORK_SEARCH_PATHS = "";

build alljoyn_darwin in Xcode 6.1.1 and get a No SConstruct file found error

Recently I am doing some AllJoyn development on iOS and OS X. When I run xcodebuild for alljoyn_darwin.xcodeproj using command line as below:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project alljoyn_darwin.xcodeproj -scheme alljoyn_core_ios -sdk iphoneos -configuration Debug PLATFORM_NAME=iphoneos
I got an error like this:
export variant=normal
/opt/local/bin/scons -u OS=darwin CPU=arm BR=on BINDINGS=cpp SERVICES= WS=off VARIANT=Debug --
scons: *** No SConstruct file found.
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.3.4/SCons/Script/Main.py", line 920, in _main
Command /opt/local/bin/scons failed with exit code 2
** BUILD FAILED **
The following build commands failed:
ExternalBuildToolExecution alljoyn_core_ios
(1 failure)
I really have no idea why I got this, I followed all the instruction in the official site--Build From Source and I am sure I set the correct OPENSSL_ROOT path. I installed scons using Macport and it was installed correctly. I tried double-click the alljoyn_darwin.xcodeproj from finder but I got the same error.
scons: *** No SConstruct file found.
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.3.4/SCons/Script/Main.py", line 920, in _main
Command /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/scons-2.3.4 failed with exit code 2
So I am stuck here. But the thing is I can successfully run AllChatz sample in sdk_14.12 for iOS in iphonesimulator for iPhone6. openssl version is 1.0.2 and I tried build both for alljoyn sdks 14.06 and 14.12. same error happened. I don't know if this is related. Anyone can help here? Many thanks.
The problem is that scons cant find the root-level SConstruct script, which probably doesnt help much as you can see that in the error :)
When you use the "-u", that tells scons to look up the directory structure for the root-level SConstruct script.
SCons must be executed from within the project directory structure. Look for the root-level SConstruct, and make sure you're executing scons from within the project directory structure.

Library not found for -llib. (clang: error: linker command failed with exit code 1 (use -v to see invocation))

I am working on a project that was previously done and uploaded on app store.When I run this app in Xcode 5.0 it is working fine but when I run this on Xcode Version 5.1.1 (5B1008) I am getting Linker error on both device and simulator.
Error Message- Library not found for -llib. (clang: error: linker command failed with exit code 1 (use -v to see invocation)).
I have searched a lot but I didn't get any thread about Library not found for -llib error. Is there anything I have to change in build settings to resolve this?
Look at the linker command line in detail for the -L options being used:
Then use Terminal or Finder to see if your libXXX.a file exists in those directories. If the library exists elsewhere then you need to configure your Library Search Paths:
However there several details which you have not provided in your question when using a library within an app:
Is the library built as part of the Xcode project/workspace (as in the first image)?
Is the library supplied by a third-party with binary (.a) and header files (as in the second image)?
TL;DR: I ran make in the wrong directory so the paths were messed up.
Problem:
>make
linking ../build/release/yubikey-personalization-gui
/usr/x86_64-suse-linux/bin/ld: cannot find -llib
...
I ran into this when compiling the Yubikey Personalisation Tool. I tracked down the -llib call in my Makefile which looked like this:
...
LINK = #echo linking $# && g++
...
LIBS = $(SUBLIBS) -L/usr/lib64 -L../lib/release -llib -lyubikey -lykpers-1 -lQtGui -L/usr/lib64 -L/usr/X11R6/lib -lQtCore -lpthread
...
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
So it was setting a variable called LINK which would print "linking" and then call g++, which is the compiler.
Then it set the var LIBS which would hold the ominous -llib.
Then it composes and runs the command $(LINK) ... $(LIBS).
Which runs g++ with the parameter -llib.
And what does that do? Turns out -l<something> is telling the compiler to use the something-library. So it asks for the library called lib here. Which is strangely generic. I figured out that the sources came with a directory called lib/, which was at ../lib.
So starting make from a directory higher up fixed it.
You should remove libstdc++ from other linker flags in your xcode project
https://stackoverflow.com/a/53103383/1344237

Resources