Building using darwinbuild
I wanted to report on recent work done to make SmartCardServices buildable outside of Apple. You can now build the Tokend and SmartCardServices projects that shipped with 10.5.6 and 10.5.7 using darwinbuild. We had to add a patch that adds includes that were needed to build with CFLite, but otherwise the source is unmodified. Darwinbuild helps by automatically putting roots in a chroot that have the private headers you need. First, install darwinbuild ( http://darwinbuild.macosforge.org/ ), then: # create a build environment $ mkdir ~/9J61 && cd ~/9J61 $ sudo darwinbuild -init 9J61 # build stuff $ sudo darwinbuild SmartCardServices $ sudo darwinbuild Tokend That's it. In this example, everything is kept in a chroot under ~/ 9J61/BuildRoot/. You can use /usr/local/share/darwinbuild/ packageRoots to produce a tarball in ~/9J61/Packages/ of your build. You can use /usr/local/bin/darwinup to install it like so: $ sudo darwinup install ~/9J61/Packages/SmartCardServices.root.tar.gz ... and to uninstall $ sudo darwinup list $ sudo darwinup uninstall <uuid from the list output above> -Bill
2009/7/10 William Siegrist <wsiegrist@apple.com>:
I wanted to report on recent work done to make SmartCardServices buildable outside of Apple. You can now build the Tokend and SmartCardServices projects that shipped with 10.5.6 and 10.5.7 using darwinbuild. We had to add a patch that adds includes that were needed to build with CFLite, but otherwise the source is unmodified. Darwinbuild helps by automatically putting roots in a chroot that have the private headers you need.
First, install darwinbuild ( http://darwinbuild.macosforge.org/ ), then:
# create a build environment $ mkdir ~/9J61 && cd ~/9J61 $ sudo darwinbuild -init 9J61
# build stuff $ sudo darwinbuild SmartCardServices
It worked fine until the C++ compiler is used. I have X Code 3.0 installed in my Leopard 10.5.7 system and g++-3.3 is not available. Only g++-4.0 is provided. In the BuildRoot only g++-4.0 and g++-4.2 are provided. [...] Mkdir /private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/Objects-normal/i386 /bin/mkdir -p /private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/Objects-normal/i386 CompileCplusplus /private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/Objects-normal/i386/readerstate.o src/PCSC/readerstate.cpp /usr/bin/g++-3.3 -c -Wp,-header-mapfile,/private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/PCSC.hmap -F/private/var/tmp/SmartCardServices/SmartCardServices-34733.sym/BuiltProducts -F/usr/local/SecurityPieces/Frameworks -I/private/var/tmp/SmartCardServices/SmartCardServices-34733.sym/BuiltProducts/include -I/private/var/tmp/SmartCardServices/SmartCardServices-34733.root//System/Library/Frameworks/include -I/private/var/tmp/SmartCardServices/SmartCardServices-34733.sym/BuiltProducts/include -Isrc/PCSC -arch i386 -fno-common -fpascal-strings -Os -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -pipe "-fmessage-length=0" -g -pipe -no-cpp-precomp -I/private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/DerivedSources -I/private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/DerivedSources "-DNDEBUG" "-Os" "-finline-functions" "-DPCSC_DEBUG=1" "-DUSE_SYSLOG=1" "-DUSE_DAEMON=1" src/PCSC/readerstate.cpp -o /private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/Objects-normal/i386/readerstate.o BuildPhase <CopyResources>PCSC.framework /bin/sh: line 1: /usr/bin/g++-3.3: No such file or directory BuildPhase "<CopyResources>PCSC.framework" "<PCSC>PCSC.framework" echo Completed phase "<CopyResources>" for "<CopyResources>PCSC.framework" ...failed CompileCplusplus /private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/Objects-normal/i386/readerstate.o ... ** BUILD FAILED ** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I then tried to symlink g++-3.3 to g++-4.2 but compilation fails: CompileCplusplus /private/var/tmp/SmartCardServices/SmartCardServices-34733.obj/SmartCardServices.build/PCSC.build/Objects-normal/ppc/readerstate.o i686-apple-darwin9-g++-4.2.1: unrecognized option '-no-cpp-precomp' cc1plus: error: unrecognized command line option "-header-mapfile" ** BUILD FAILED ** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ How am I supposed to solve this problem? Port the code/Makefiles to g++ 4.x or write a g++-3.3 wrapper that removes unsupported options? Regards, -- Dr. Ludovic Rousseau
On Jul 16, 2009, at 2:14 AM, Ludovic Rousseau wrote:
2009/7/10 William Siegrist <wsiegrist@apple.com>:
I wanted to report on recent work done to make SmartCardServices buildable outside of Apple. You can now build the Tokend and SmartCardServices projects that shipped with 10.5.6 and 10.5.7 using darwinbuild. We had to add a patch that adds includes that were needed to build with CFLite, but otherwise the source is unmodified. Darwinbuild helps by automatically putting roots in a chroot that have the private headers you need.
First, install darwinbuild ( http://darwinbuild.macosforge.org/ ), then:
# create a build environment $ mkdir ~/9J61 && cd ~/9J61 $ sudo darwinbuild -init 9J61
# build stuff $ sudo darwinbuild SmartCardServices
It worked fine until the C++ compiler is used. I have X Code 3.0 installed in my Leopard 10.5.7 system and g++-3.3 is not available. Only g++-4.0 is provided. In the BuildRoot only g++-4.0 and g++-4.2 are provided.
Can you try with Xcode 3.1.3? 3.0 is pretty old and I did not test with it. Thanks -Bill
2009/7/16 William Siegrist <wsiegrist@apple.com>:
On Jul 16, 2009, at 2:14 AM, Ludovic Rousseau wrote:
2009/7/10 William Siegrist <wsiegrist@apple.com>:
I wanted to report on recent work done to make SmartCardServices buildable outside of Apple. You can now build the Tokend and SmartCardServices projects that shipped with 10.5.6 and 10.5.7 using darwinbuild. We had to add a patch that adds includes that were needed to build with CFLite, but otherwise the source is unmodified. Darwinbuild helps by automatically putting roots in a chroot that have the private headers you need.
First, install darwinbuild ( http://darwinbuild.macosforge.org/ ), then:
# create a build environment $ mkdir ~/9J61 && cd ~/9J61 $ sudo darwinbuild -init 9J61
# build stuff $ sudo darwinbuild SmartCardServices
It worked fine until the C++ compiler is used. I have X Code 3.0 installed in my Leopard 10.5.7 system and g++-3.3 is not available. Only g++-4.0 is provided. In the BuildRoot only g++-4.0 and g++-4.2 are provided.
Can you try with Xcode 3.1.3? 3.0 is pretty old and I did not test with it.
Xcode 3.1.3 does not solve the problem. g++-3.3 is not installed by default. I need to select "Mac OS X 10.3.9 Support" to have gcc 3.3 installed. It know works. Thanks. The next step is to port the code to g++ 4.x instead of g++ 3.3 Bye -- Dr. Ludovic Rousseau
2009/7/17 Ludovic Rousseau <ludovic.rousseau@gmail.com>:
2009/7/16 William Siegrist <wsiegrist@apple.com>:
On Jul 16, 2009, at 2:14 AM, Ludovic Rousseau wrote:
2009/7/10 William Siegrist <wsiegrist@apple.com>:
I wanted to report on recent work done to make SmartCardServices buildable outside of Apple. You can now build the Tokend and SmartCardServices projects that shipped with 10.5.6 and 10.5.7 using darwinbuild. We had to add a patch that adds includes that were needed to build with CFLite, but otherwise the source is unmodified. Darwinbuild helps by automatically putting roots in a chroot that have the private headers you need.
First, install darwinbuild ( http://darwinbuild.macosforge.org/ ), then:
# create a build environment $ mkdir ~/9J61 && cd ~/9J61 $ sudo darwinbuild -init 9J61
# build stuff $ sudo darwinbuild SmartCardServices
It worked fine until the C++ compiler is used. I have X Code 3.0 installed in my Leopard 10.5.7 system and g++-3.3 is not available. Only g++-4.0 is provided. In the BuildRoot only g++-4.0 and g++-4.2 are provided.
Can you try with Xcode 3.1.3? 3.0 is pretty old and I did not test with it.
Xcode 3.1.3 does not solve the problem. g++-3.3 is not installed by default.
I need to select "Mac OS X 10.3.9 Support" to have gcc 3.3 installed. It know works. Thanks.
I installed a new BuildRoot for Leopard 9L30 and I have the problem again :-( I installed Xcode 3.1.4 and have g++-3.3 on my system but not in the BuildRoot. And I don't remember what I did last year to have g++-3.3 installed in the BuildRoot. I can't find gcc-3.3 in http://src.macosforge.org/Roots/9A581/ Only gcc_42.root.tar.gz is available. Do I have to install gcc 3.3 *by hand* in the BuildRoot? Thanks -- Dr. Ludovic Rousseau
Hi, Remotely, the binaryroots can be find here: http://src.macosforge.org/Roots/9A581/gcc_os.root.tar.gz aladin@PureDarwin:# darwinxref findFile gcc-3.3 gcc_os: /usr/bin/gcc-3.3 Best, Aladin. On Fri, Jan 15, 2010 at 3:54 PM, Ludovic Rousseau <ludovic.rousseau@gmail.com> wrote:
2009/7/17 Ludovic Rousseau <ludovic.rousseau@gmail.com>:
2009/7/16 William Siegrist <wsiegrist@apple.com>:
On Jul 16, 2009, at 2:14 AM, Ludovic Rousseau wrote:
2009/7/10 William Siegrist <wsiegrist@apple.com>:
I wanted to report on recent work done to make SmartCardServices buildable outside of Apple. You can now build the Tokend and SmartCardServices projects that shipped with 10.5.6 and 10.5.7 using darwinbuild. We had to add a patch that adds includes that were needed to build with CFLite, but otherwise the source is unmodified. Darwinbuild helps by automatically putting roots in a chroot that have the private headers you need.
First, install darwinbuild ( http://darwinbuild.macosforge.org/ ), then:
# create a build environment $ mkdir ~/9J61 && cd ~/9J61 $ sudo darwinbuild -init 9J61
# build stuff $ sudo darwinbuild SmartCardServices
It worked fine until the C++ compiler is used. I have X Code 3.0 installed in my Leopard 10.5.7 system and g++-3.3 is not available. Only g++-4.0 is provided. In the BuildRoot only g++-4.0 and g++-4.2 are provided.
Can you try with Xcode 3.1.3? 3.0 is pretty old and I did not test with it.
Xcode 3.1.3 does not solve the problem. g++-3.3 is not installed by default.
I need to select "Mac OS X 10.3.9 Support" to have gcc 3.3 installed. It know works. Thanks.
I installed a new BuildRoot for Leopard 9L30 and I have the problem again :-( I installed Xcode 3.1.4 and have g++-3.3 on my system but not in the BuildRoot. And I don't remember what I did last year to have g++-3.3 installed in the BuildRoot.
I can't find gcc-3.3 in http://src.macosforge.org/Roots/9A581/ Only gcc_42.root.tar.gz is available.
Do I have to install gcc 3.3 *by hand* in the BuildRoot?
Thanks
-- Dr. Ludovic Rousseau _______________________________________________ SmartcardServices-Dev mailing list SmartcardServices-Dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/smartcardservices-dev
participants (3)
-
Aladin
-
Ludovic Rousseau
-
William Siegrist