EDIT 2015-29-10. II. In fact -arch armv7 instead of -arch arm64 and without lowering optimization, worked perfectly.
EDIT 2015-29-10. I. I tried to add
export CFLAGS="-O1"
export CXXFLAGS="-O1"
before configure, and had the same error, with a different file missing this time :
"/usr/local/cctools-arm64-port/bin/ld" -demangle -dynamic -arch arm64 -iphoneos_version_min 5.0.0 -syslibroot /usr/local/iPhoneOS8.4.sdk -o testcpp /var/tmp/testcpp-4f79ac.o -lstdc++ -lSystem
ld: file not found: N?L
I also tried with -O0 optimization instead of -01, same result.
EDIT 2015-28-10. II. I did this :
./autogen.sh
export CC="clang -arch arm64 -mios-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk"
export CXX="clang++ -arch arm64 -mios-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk"
./configure -v --host=arm-apple-darwin11 --prefix=/usr/local/lvm-cross/cctools-arm64-port
unset CC CXX
make && sudo make install
Then I tried a simple hello world on iDevice, with testcpp.cpp containing :
#include <iostream>
int main()
{
std::cout << "oijo" << std::endl;
return 0;
}
compiled with
clang++ -v -isysroot /usr/local/iPhoneOS8.4.sdk -target arm64-apple-darwin11 testcpp.cpp -o testcpp
which gave me :
clang version 3.7.0 (tags/RELEASE_370/final)
Target: arm64-apple-darwin11
Thread model: posix
"/usr/local/llvm-ios/bin/clang++" -cc1 -triple arm64-apple-ios5.0.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name testcpp.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -target-cpu generic -target-feature +neon -target-abi darwinpcs -target-linker-version 253.3.3 -v -dwarf-column-info -resource-dir /usr/local/llvm-ios/bin/../lib/clang/3.7.0 -isysroot /usr/local/iPhoneOS8.4.sdk -fdeprecated-macro -fdebug-compilation-dir /var/mobile/Documents/CODING/MY/TESTS_0/CPP -ferror-limit 19 -fmessage-length 108 -stack-protector 1 -mstackrealign -fallow-half-arguments-and-returns -fblocks -fobjc-runtime=ios-5.0.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/tmp/testcpp-f1de66.o -x c++ testcpp.cpp
clang -cc1 version 3.7.0 based upon LLVM 3.7.0 default target arm-apple-darwin14.0.0
ignoring nonexistent directory "/usr/local/iPhoneOS8.4.sdk/usr/include/c++/4.2.1/arm64-apple-darwin10/"
ignoring nonexistent directory "/usr/local/iPhoneOS8.4.sdk/usr/local/include"
ignoring nonexistent directory "/usr/local/iPhoneOS8.4.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/iPhoneOS8.4.sdk/usr/include/c++/4.2.1
/usr/local/iPhoneOS8.4.sdk/usr/include/c++/4.2.1/backward
/usr/local/llvm-ios/bin/../lib/clang/3.7.0/include
/usr/local/iPhoneOS8.4.sdk/usr/include
/usr/local/iPhoneOS8.4.sdk/System/Library/Frameworks (framework directory)
End of search list.
"/usr/local/cctools-arm64-port/bin/ld" -demangle -dynamic -arch arm64 -iphoneos_version_min 5.0.0 -syslibroot /usr/local/iPhoneOS8.4.sdk -o testcpp /var/tmp/testcpp-f1de66.o -lstdc++ -lSystem
ld: file not found: ?4
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
I also tried without the unset CC CXX, with the same "success"...
EDIT 2015-28-10. I. Using cydia solutions as suggested indeed worked, but I definitely want to build it myself, so I followed the https://github.com/tpoechtrager/cctools-port way. As it is way too boring to get/build libtool for mac os, I switched to a vitual box ubuntu 15.10 64 bits, where I sudo apt-get install'ed the following packages : automake, autogen, libtool, clang-3.7, uuid-dev and llvm-3.7-dev. Then I cd'ed to the cctools directory and did :
./autogen.sh
export CC="clang-3.7 -arch arm64"
export CXX="clang++-3.7 -arch arm64"
./configure --prefix=/home/lvm-ubuntu/Desktop/iPad/cctools-produced/ --host=arm-apple-darwin11
make
(The complete output is in the new following gist.) make produced the following warnings and errors :
clang: warning: argument unused during compilation: '-arch arm64'
../include/foreign/libkern/arm/OSByteOrder.h:11:10: error: redefinition of
'_OSSwapInt16'
uint16_t _OSSwapInt16(uint16_t data)
^
../include/foreign/libkern/i386/_OSByteOrder.h:46:1: note: previous definition
is here
_OSSwapInt16(
^
and analogue errors for _OSSwapInt32 and _OSSwapInt64... I must be for sure doing something wrong.
Initial question.
I succeed in cross-building clang+llvm for iOS8.4 on a jailbroken iPad mini 3 wifi, mainly thanks to the two following questions :
https://stackoverflow.com/questions/32808144/how-to-cross-compile-clang-llvm-3-7-0-for-ios8-x-on-ipad-mini-3/
and
https://stackoverflow.com/questions/23946851/how-to-cross-compile-clang-llvm-for-ios/
Set all paths etc, and tried a clang++ -v testcpp.cpp -o testcpp where testcpp.cppcontains :
int main()
{
return 0;
}
and got this :
clang++: error: unable to execute command: Executable "ld" doesn't exist!
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
(the whole verbose output is in this gist.)
Obviously I don't have GNU's ld nor any real "remplacement" of it (by llvm-clang), so that I am asking myself : what is my strategy in this case ? (Having no linker, I can't even try to build binutils on my iPad to use its ld).
Precision : I would like the linking to be done behind the scene, so that I could keep doing clang++ -v testcpp.cpp -o testcpp, that is, I don't want to do the linking "manually" myself in several steps. (But a script could be ok, even if I find more elegant to have a real ld replacement...)
Remark : in llvm-clang bin folder I have this :
XXXXs-iPad:/usr/local/llvm-ios/bin mobile$ ls -l
total 274412
-rwxr-xr-x 1 root wheel 205456 Oct 18 12:49 FileCheck*
-rwxr-xr-x 1 root wheel 7704096 Oct 18 12:48 bugpoint*
-rwxr-xr-x 1 root wheel 122036 Oct 18 12:48 c-index-test*
-rwxr-xr-x 1 root wheel 40802004 Oct 18 12:48 clang*
-rwxr-xr-x 1 root wheel 40802004 Oct 18 12:49 clang++*
-rwxr-xr-x 1 root wheel 31252792 Oct 18 12:49 clang-check*
-rwxr-xr-x 1 root wheel 1225352 Oct 18 12:49 clang-format*
-rwxr-xr-x 1 root wheel 671500 Oct 18 12:49 clang-tblgen*
-rwxr-xr-x 1 root wheel 49684 Oct 18 12:49 count*
-rwxr-xr-x 1 root wheel 22439396 Oct 18 12:49 llc*
-rwxr-xr-x 1 root wheel 10351388 Oct 18 12:49 lli*
-rwxr-xr-x 1 root wheel 208140 Oct 18 12:49 lli-child-target*
-rwxr-xr-x 1 root wheel 9144692 Oct 18 12:49 llvm-ar*
-rwxr-xr-x 1 root wheel 1619592 Oct 18 12:49 llvm-as*
-rwxr-xr-x 1 root wheel 155080 Oct 18 12:49 llvm-bcanalyzer*
-rwxr-xr-x 1 root wheel 120864 Oct 18 12:49 llvm-config*
-rwxr-xr-x 1 root wheel 92232 Oct 18 12:49 llvm-config-host*
-rwxr-xr-x 1 root wheel 1604600 Oct 18 12:49 llvm-cov*
-rwxr-xr-x 1 root wheel 1472656 Oct 18 12:49 llvm-cxxdump*
-rwxr-xr-x 1 root wheel 1471516 Oct 18 12:49 llvm-diff*
-rwxr-xr-x 1 root wheel 1225632 Oct 18 12:49 llvm-dis*
-rwxr-xr-x 1 root wheel 18342488 Oct 18 12:49 llvm-dsymutil*
-rwxr-xr-x 1 root wheel 419892 Oct 18 12:49 llvm-dwarfdump*
-rwxr-xr-x 1 root wheel 1686496 Oct 18 12:49 llvm-extract*
-rwxr-xr-x 1 root wheel 1800856 Oct 18 12:49 llvm-link*
-rwxr-xr-x 1 root wheel 10140692 Oct 18 12:49 llvm-mc*
-rwxr-xr-x 1 root wheel 138552 Oct 18 12:49 llvm-mcmarkup*
-rwxr-xr-x 1 root wheel 9144172 Oct 18 12:49 llvm-nm*
-rwxr-xr-x 1 root wheel 11554352 Oct 18 12:49 llvm-objdump*
-rwxr-xr-x 1 root wheel 220840 Oct 18 12:49 llvm-pdbdump*
-rwxr-xr-x 1 root wheel 469920 Oct 18 12:49 llvm-profdata*
-rwxr-xr-x 1 root wheel 9144692 Oct 18 12:49 llvm-ranlib*
-rwxr-xr-x 1 root wheel 1768528 Oct 18 12:49 llvm-readobj*
-rwxr-xr-x 1 root wheel 8388100 Oct 18 12:50 llvm-rtdyld*
-rwxr-xr-x 1 root wheel 1489124 Oct 18 12:50 llvm-size*
-rwxr-xr-x 1 root wheel 2106052 Oct 18 12:50 llvm-stress*
-rwxr-xr-x 1 root wheel 1610176 Oct 18 12:50 llvm-symbolizer*
-rwxr-xr-x 1 root wheel 1422732 Oct 18 12:50 llvm-tblgen*
-rwxr-xr-x 1 root wheel 1455516 Oct 18 12:50 macho-dump*
-rwxr-xr-x 1 root wheel 71184 Oct 18 12:50 not*
-rwxr-xr-x 1 root wheel 1620520 Oct 18 12:50 obj2yaml*
-rwxr-xr-x 1 root wheel 23007212 Oct 18 12:50 opt*
-rwxr-xr-x 1 root wheel 1768416 Oct 18 12:50 verify-uselistorder*
-rwxr-xr-x 1 root wheel 402360 Oct 18 12:50 yaml2obj*
Install org.coolstar.cctools and org.coolstar.ld64 via Cydia.
Or, alternatively, build https://github.com/tpoechtrager/cctools-port by hand.
CXX="clang++ -arch arm64" CC="clang -arch arm64" ./configure --host=arm-apple-darwin11
Related
I'm having trouble running Cytoscape 3.9.1 on MacOS Big Sur. The system checker fails with the following:
############# Cytoscape System Requirements Checker for Mac ##############
Target Cytoscape version: 3.9.0
Your shell is bash
Compatible OS version found: 11.6
- Pass: OS Version = 11.6.1
- Pass: Following Oracle JDK found:
/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk
Fail: Java is not reachable.
Try re-installing Java 11.
I have Java 11 installed at the location shown in the output, and it seems fine:
$ /Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home/bin/java -version
java version "11.0.5" 2019-10-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.5+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.5+10-LTS, mixed mode)
Permissions look right (these are the same all the way up the directory hierarchy):
$ ls -lh /Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home/bin/
total 6672
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jaotc
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jar
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jarsigner
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 java
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 javac
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 javadoc
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 javap
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jcmd
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jconsole
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jdb
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jdeprscan
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jdeps
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jhsdb
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jimage
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jinfo
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jjs
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jlink
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jmap
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jmod
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jps
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jrunscript
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jshell
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jstack
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jstat
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 jstatd
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 keytool
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 pack200
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 rmic
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 rmid
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 rmiregistry
-rwxr-xr-x 1 root wheel 101K Oct 6 2019 serialver
-rwxr-xr-x 1 root wheel 110K Oct 6 2019 unpack200
I also have several more up-to-date Java versions installed (I'm not sure if these are causing the issue):
$ ls /Library/Java/JavaVirtualMachines/
jdk-10.0.2.jdk jdk-12.0.2.jdk jdk-14.0.1.jdk jdk1.8.0_181.jdk
jdk-11.0.5.jdk jdk-13.0.2.jdk jdk-17.0.1.jdk
The default is JDK17:
$ java -version
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
If I invoke cytoscape.sh directly from the command line, it appears to be trying to run under Java 8:
$ ./cytoscape.sh
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/cytoscape/launcher/internal/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Cytoscape 3.9.1 will not run on JDK 17. You need to set your JAVA_HOME to point to your JDK 11 installation and things should work.
-- scooter
I had a similar issue with Java. So I'm including my answer here if anyone else has the same issue as me.
First I went here to find out "How to set or change the default Java (JDK) version on macOS?"
From there you should be able to find out the Java version you want to use. Then set your JAVA_HOME variable
Using bash or zsh you can set your JAVA_HOME environment variable like so:
Bash Example
echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 11.0.7)" >> ~/.bash_profile
or in Zsh
echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 11.0.7)" >> ~/.zshrc
Restart terminal after this.
You can check your shell profile and see that this line has now been added to the end of the profile:
nano ~/.bash_profile
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home
You can also check that java is mapped to the desired Java version by default now:
java -version
Running the System Checker Script on Mac should now recognize Java is installed correctly
./mac.sh
Cytoscape should now run by clicking on the cytoscape.sh script
With the objective of implementing Rails 5.2.4, I just installed PostgreSQL 13 on a new SUSE 15.1 server, then Ruby 2.6.6, and I am now trying to install PostgreSQL client gem: pg version 1.2.3.
I first tried to run gem install pg, which claims for missing files pg_config and libpq-fe.h:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /home/a80838986/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pg-1.2.3/ext
/home/a80838986/.rbenv/versions/2.6.6/bin/ruby -I /home/a80838986/.rbenv/versions/2.6.6/lib/ruby/2.6.0 -r ./siteconf20201103-26887-19gz250.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/a80838986/.rbenv/versions/2.6.6/bin/$(RUBY_BASE_NAME)
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/a80838986/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/pg-1.2.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/a80838986/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/pg-1.2.3 for inspection.
Results logged to /home/a80838986/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/pg-1.2.3/gem_make.out
Searching in the file system, I found a set of files which could fulfill gem's install requirements, but I can't find out how to run the install with these:
ls -l /usr/include/pgsql/ total 152
-rwxr-xr-x 1 root root 656 Oct 29 01:11 ecpg_config.h
-rwxr-xr-x 1 root root 2544 Oct 29 01:11 ecpgerrno.h
-rwxr-xr-x 1 root root 2803 Oct 29 01:11 ecpg_informix.h
-rwxr-xr-x 1 root root 2681 Oct 29 01:11 ecpglib.h
-rwxr-xr-x 1 root root 2709 Oct 29 01:11 ecpgtype.h
drwxr-xr-x 1 root root 8 Nov 3 12:25 informix
drwxr-xr-x 1 root root 102 Nov 3 12:25 internal
drwxr-xr-x 1 root root 20 Nov 3 12:25 libpq
-rwxr-xr-x 1 root root 2214 Oct 29 01:11 libpq-events.h
-rwxr-xr-x 1 root root 23338 Oct 29 01:11 libpq-fe.h
-rwxr-xr-x 1 root root 323 Oct 29 01:11 pg_config_ext.h
-rwxr-xr-x 1 root root 31970 Oct 29 01:11 pg_config.h
-rwxr-xr-x 1 root root 12877 Oct 29 01:11 pg_config_manual.h
-rwxr-xr-x 1 root root 1052 Oct 29 01:11 pg_config_os.h
-rwxr-xr-x 1 root root 797 Oct 29 01:11 pgtypes_date.h
-rwxr-xr-x 1 root root 530 Oct 29 01:11 pgtypes_error.h
-rwxr-xr-x 1 root root 222 Oct 29 01:11 pgtypes.h
-rwxr-xr-x 1 root root 1032 Oct 29 01:11 pgtypes_interval.h
-rwxr-xr-x 1 root root 2251 Oct 29 01:11 pgtypes_numeric.h
-rwxr-xr-x 1 root root 945 Oct 29 01:11 pgtypes_timestamp.h
-rwxr-xr-x 1 root root 2239 Oct 29 01:11 postgres_ext.h
-rwxr-xr-x 1 root root 838 Oct 29 01:11 sql3types.h
-rwxr-xr-x 1 root root 1283 Oct 29 01:11 sqlca.h
-rwxr-xr-x 1 root root 1575 Oct 29 01:11 sqlda-compat.h
-rwxr-xr-x 1 root root 321 Oct 29 01:11 sqlda.h
-rwxr-xr-x 1 root root 824 Oct 29 01:11 sqlda-native.h
The pg_config is still missing, the libpq-fe.h is there, but:
The no-pg-config option has no effect.
I dont know how to set the pass to libpq-fe.h
Can you help me finalize this installation?
I found out that the pg_config utility belongs to the postgresql13-server-devel package. Installing this package solved my issue.
This might sound like a silly question but If you have a thirdParty.framework file, can you tell if it's static or dynamic? I mean, do they look different if you look inside?
It can be either.
Only iOS8+ will allow dynamic frameworks in the app bundle, however.
The way to find out is to look in the .framework and use the file command on the main file:
$ cd iOS/Crashlytics.framework
$ ls -l
total 9984
-rwxr-xr-x 1 andy staff 4710656 11 Sep 17:11 Crashlytics
drwxr-xr-x 8 andy staff 272 11 Sep 17:11 Headers
-rw-r--r-- 1 andy staff 1553 11 Sep 17:11 Info.plist
drwxr-xr-x 3 andy staff 102 11 Sep 17:11 Modules
-rwxr-xr-x 1 andy staff 146164 11 Sep 17:11 run
-rwxr-xr-x 1 andy staff 241688 11 Sep 17:11 submit
$ file Crashlytics
Crashlytics: Mach-O universal binary with 5 architectures
Crashlytics (for architecture armv7): current ar archive random library
Crashlytics (for architecture armv7s): current ar archive random library
Crashlytics (for architecture i386): current ar archive random library
Crashlytics (for architecture x86_64): current ar archive random library
Crashlytics (for architecture arm64): current ar archive random library
Where ar archive means "static library".
Alternatively, a "dynamic" framework will look like this and explicitly state that it's dynamically linked.
$ cd /Library/Frameworks/iTunesLibrary.framework/
$ ls -l
total 40
lrwxr-xr-x 1 root wheel 24 10 Sep 17:38 Headers -> Versions/Current/Headers
lrwxr-xr-x 1 root wheel 24 10 Sep 17:38 Modules -> Versions/Current/Modules
lrwxr-xr-x 1 root wheel 26 10 Sep 17:38 Resources -> Versions/Current/Resources
drwxr-xr-x 4 root wheel 136 10 Sep 17:41 Versions
lrwxr-xr-x 1 root wheel 22 10 Sep 17:38 XPCServices -> Versions/A/XPCServices
lrwxr-xr-x 1 root wheel 30 10 Sep 17:38 iTunesLibrary -> Versions/Current/iTunesLibrary
$ file Versions/Current/iTunesLibrary
Versions/Current/iTunesLibrary: Mach-O universal binary with 2 architectures
Versions/Current/iTunesLibrary (for architecture i386): Mach-O dynamically linked shared library i386
Versions/Current/iTunesLibrary (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
I use this command to list all STATIC Frameworks from a path with a list of frameworks:
find -E . -type f -iregex ".*\.framework\/[^./]*" -exec file {} \; | grep ': current ar archive' | sed 's/.*\/\(.*.framework\).*/\1/'
I'm looking for a solution to save all installed formulae, similar to what package.json does for npm, or any other package manager with it's config file.
Is this possible with homebrew?
I use this:
for p in $(brew list); do brew info $p; done > brewconfig.txt
If you wanted something a little more complete and legible:
#!/bin/bash
brew list > brew-packages.txt
for p in $(brew list); do
brew list $p > brew-$p-files.txt
brew info $p > brew-$p-config.txt
done
which gives this
-rw-r--r-- 1 mark staff 381 4 Mar 13:02 brew-wget-files.txt
-rw-r--r-- 1 mark staff 617 4 Mar 13:02 brew-wget-config.txt
-rw-r--r-- 1 mark staff 496 4 Mar 13:02 brew-zlib-files.txt
-rw-r--r-- 1 mark staff 377 4 Mar 13:02 brew-zlib-config.txt
-rw-r--r-- 1 mark staff 3849 4 Mar 13:02 brew-zeromq-files.txt
-rw-r--r-- 1 mark staff 455 4 Mar 13:02 brew-zeromq-config.txt
-rw-r--r-- 1 mark staff 4292 4 Mar 13:02 brew-xz-files.txt
-rw-r--r-- 1 mark staff 309 4 Mar 13:02 brew-xz-config.txt
There is! brew tap homebrew/brewdler and brew brewdle dump. See brew brewdle help for details.
I'm sure the .A means something, but searching for it yields nothing but noise. Please enlighten me.
Oh, they're the same.
-rwxr-xr-x 1 root wheel 4969408 Sep 25 16:06 libicucore.A.dylib*
lrwxr-xr-x 1 root wheel 18 Oct 7 2011 libicucore.dylib# -> libicucore.A.dylib