digitalmars.D - Building druntime on MAC OS X
- Andrew Edwards (20/20) Nov 15 2013 I am having little problem building druntime on Mac OS X 10.9
- evilrat (5/17) Nov 15 2013 i think this is related to hidden replace of gcc with clang.
- Joakim (12/32) Nov 15 2013 The recent switch to clang on 10.9 as the reason seemed to make
- Andrew Edwards (2/6) Nov 16 2013 The correct flag is -export_dynamic. Thanks for the suggestion.
- deadalnix (3/10) Nov 16 2013 Yes I was able to revert GCC to actually be GCC, but ld is still
- Orvid King (18/29) Nov 16 2013 I've been building the DMD trunk on OSX with no issues, and, although
- Joakim (7/18) Nov 16 2013 I took a look at the source for their linker and it doesn't
- Nathan M. Swan (5/25) Nov 15 2013 Have you tried using this?
- Andrew Edwards (2/6) Nov 16 2013 I have not.
- Jacob Carlborg (7/19) Nov 16 2013 --export-dynamic doesn't come from the makefile but most likely from
- Andrew Edwards (24/43) Nov 16 2013 You nailed it. It is in the dmd.conf file. Its content is this:
- Jacob Carlborg (8/24) Nov 16 2013 I see. I have never used "install" for DMD before. dmd.conf shipping in
- Martin Nowak (6/19) Nov 16 2013 The install target is work in progress. We want to use this to build
- Andrew Edwards (8/18) Nov 16 2013 What else is missing for the OS X build? After correcting the DFLAGS in
- Jacob Carlborg (8/14) Nov 17 2013 Please remove -L-ldruntime-osxdefault. druntime is statically linked
- Andrew Edwards (15/19) Nov 17 2013 Removed also.
- Jacob Carlborg (7/19) Nov 18 2013 I don't know. This doesn't seem specific to Mac OS X. I guess what's
- Andrew Edwards (75/93) Nov 21 2013 That is good but we will be building from a branch when it's time to
- Andrew Edwards (2/5) Nov 21 2013 Messed that up... I meant Brad Roberts.
- Jacob Carlborg (12/25) Nov 21 2013 No, you can try here as well:
- Andrew Edwards (12/18) Nov 21 2013 Noted.
- Jacob Carlborg (11/21) Nov 21 2013 Yes, it would be preferred if it was built from source. But the solution...
- Joshua Niehus (4/7) Nov 21 2013 this might help:
- Jacob Carlborg (8/13) Nov 21 2013 Yeah, I tried that, it didn't work. It's not just the Bom file that is
- Andrew Edwards (18/38) Nov 22 2013 To be honest, I started with the existing script. I would have loved to
- Jacob Carlborg (13/23) Nov 23 2013 I would have asked what's needed to build the installer instead
- Jacob Carlborg (18/81) Nov 23 2013 Since this script will only be run on Mac OS X there's no point
I am having little problem building druntime on Mac OS X 10.9 (Mavericks) and am wondering if anyone has experienced with this and some guidance on how to fix it. Here is my command: make -f posix.mak install DMD=../install/bin/dmd And here is the resulting error: ../install/bin/dmd -ofgenerated/osx/default/rdmd rdmd.d ld: unknown option: --export-dynamic clang: error: linker command failed with exit code 1 (use -v to see invocation) --- errorlevel 1 make: *** [generated/osx/default/rdmd] Error 1 -- Regards -------------------- http://www.akeron.co auto getAddress() { string location = " ", period = "."; return ("info" ~ location ~ "afidem" ~ period ~ "org"); }
Nov 15 2013
On Saturday, 16 November 2013 at 03:20:03 UTC, Andrew Edwards wrote:I am having little problem building druntime on Mac OS X 10.9 (Mavericks) and am wondering if anyone has experienced with this and some guidance on how to fix it. Here is my command: make -f posix.mak install DMD=../install/bin/dmd And here is the resulting error: ../install/bin/dmd -ofgenerated/osx/default/rdmd rdmd.d ld: unknown option: --export-dynamic clang: error: linker command failed with exit code 1 (use -v to see invocation) --- errorlevel 1 make: *** [generated/osx/default/rdmd] Error 1i think this is related to hidden replace of gcc with clang. personally i don't do much c++ on osx, but people suggests use "-export-dynamic"(note single minus). hope it helps.
Nov 15 2013
On Saturday, 16 November 2013 at 03:50:25 UTC, evilrat wrote:On Saturday, 16 November 2013 at 03:20:03 UTC, Andrew Edwards wrote:The recent switch to clang on 10.9 as the reason seemed to make sense, as I've run into a similar issue with clang before. But after googling a little bit and looking at the error, maybe the problem is a new linker in OS X 10.9? Assuming we've always been passing --export-dynamic to the linker, I don't see why it would start failing now, unless the GNU ld from binutils has been swapped out. I suggest you look at where this --export-dynamic flag is being added in the build scripts and try changing the number of dashes or removing the flag, after looking at the docs for the OS X linker to see what flags it takes.I am having little problem building druntime on Mac OS X 10.9 (Mavericks) and am wondering if anyone has experienced with this and some guidance on how to fix it. Here is my command: make -f posix.mak install DMD=../install/bin/dmd And here is the resulting error: ../install/bin/dmd -ofgenerated/osx/default/rdmd rdmd.d ld: unknown option: --export-dynamic clang: error: linker command failed with exit code 1 (use -v to see invocation) --- errorlevel 1 make: *** [generated/osx/default/rdmd] Error 1i think this is related to hidden replace of gcc with clang. personally i don't do much c++ on osx, but people suggests use "-export-dynamic"(note single minus). hope it helps.
Nov 15 2013
On 11/16/13, 1:47 AM, Joakim wrote:I suggest you look at where this --export-dynamic flag is being added in the build scripts and try changing the number of dashes or removing the flag, after looking at the docs for the OS X linker to see what flags it takes.The correct flag is -export_dynamic. Thanks for the suggestion.
Nov 16 2013
On Saturday, 16 November 2013 at 06:47:39 UTC, Joakim wrote:The recent switch to clang on 10.9 as the reason seemed to make sense, as I've run into a similar issue with clang before. But after googling a little bit and looking at the error, maybe the problem is a new linker in OS X 10.9? Assuming we've always been passing --export-dynamic to the linker, I don't see why it would start failing now, unless the GNU ld from binutils has been swapped out.Yes I was able to revert GCC to actually be GCC, but ld is still the apple thing.
Nov 16 2013
On 11/16/13, deadalnix <deadalnix gmail.com> wrote:On Saturday, 16 November 2013 at 06:47:39 UTC, Joakim wrote:I've been building the DMD trunk on OSX with no issues, and, although I am using 10.8, I'm using the SDK for OSX 10.9, which includes clang in place of GCC. Actually, wait, I just looked at my build script (created when I was still using the 10.8 SDK), and I actually do: cd dmd/src make -fposix.mak MODEL=64 WARNINGS="-Wno-deprecated -Wstrict-aliasing -Wno-logical-op-parentheses" make -fposix.mak MODEL=64 install cat ../../install/bin/dmd.conf | sed "s/--export-dynamic/-export_dynamic/g" > ../../install/bin/dmd.conf2 cat ../../install/bin/dmd.conf2 | sed "s/-lrt/-ldruntime-osx64/g" > ../../install/bin/dmd.conf rm ../../install/bin/dmd.conf2 cd ../.. So it appears that it's just a matter of the argument being passed slightly differently....The recent switch to clang on 10.9 as the reason seemed to make sense, as I've run into a similar issue with clang before. But after googling a little bit and looking at the error, maybe the problem is a new linker in OS X 10.9? Assuming we've always been passing --export-dynamic to the linker, I don't see why it would start failing now, unless the GNU ld from binutils has been swapped out.Yes I was able to revert GCC to actually be GCC, but ld is still the apple thing.
Nov 16 2013
On Saturday, 16 November 2013 at 20:25:01 UTC, deadalnix wrote:On Saturday, 16 November 2013 at 06:47:39 UTC, Joakim wrote:I took a look at the source for their linker and it doesn't appear to have changed in 10.9 after all, assuming I'm looking in the right place: ;) http://www.opensource.apple.com/source/cctools/cctools-845/ld/ It looks like the problem was that he was using the install target on OS X, where it isn't supported.The recent switch to clang on 10.9 as the reason seemed to make sense, as I've run into a similar issue with clang before. But after googling a little bit and looking at the error, maybe the problem is a new linker in OS X 10.9? Assuming we've always been passing --export-dynamic to the linker, I don't see why it would start failing now, unless the GNU ld from binutils has been swapped out.Yes I was able to revert GCC to actually be GCC, but ld is still the apple thing.
Nov 16 2013
On 11/15/13 6:19 PM, Andrew Edwards wrote:I am having little problem building druntime on Mac OS X 10.9 (Mavericks) and am wondering if anyone has experienced with this and some guidance on how to fix it. Here is my command: make -f posix.mak install DMD=../install/bin/dmd And here is the resulting error: ../install/bin/dmd -ofgenerated/osx/default/rdmd rdmd.d ld: unknown option: --export-dynamic clang: error: linker command failed with exit code 1 (use -v to see invocation) --- errorlevel 1 make: *** [generated/osx/default/rdmd] Error 1 -- Regards -------------------- http://www.akeron.co auto getAddress() { string location = " ", period = "."; return ("info" ~ location ~ "afidem" ~ period ~ "org"); }Have you tried using this? https://github.com/carlor/dlang-workspace Sorry for the shameless plug. NMS
Nov 15 2013
On 11/15/13, 11:14 PM, Nathan M. Swan wrote:Have you tried using this? https://github.com/carlor/dlang-workspace Sorry for the shameless plug. NMSI have not.
Nov 16 2013
On 2013-11-16 04:19, Andrew Edwards wrote:I am having little problem building druntime on Mac OS X 10.9 (Mavericks) and am wondering if anyone has experienced with this and some guidance on how to fix it. Here is my command: make -f posix.mak install DMD=../install/bin/dmd And here is the resulting error: ../install/bin/dmd -ofgenerated/osx/default/rdmd rdmd.d ld: unknown option: --export-dynamic clang: error: linker command failed with exit code 1 (use -v to see invocation) --- errorlevel 1 make: *** [generated/osx/default/rdmd] Error 1--export-dynamic doesn't come from the makefile but most likely from dmd.conf. It's used on Linux and FreeBSD but not on Mac OS X, please remove it. BTW where did you get the dmd.conf file from? -- /Jacob Carlborg
Nov 16 2013
On 11/16/13, 4:57 AM, Jacob Carlborg wrote:On 2013-11-16 04:19, Andrew Edwards wrote:You nailed it. It is in the dmd.conf file. Its content is this: [Environment] DFLAGS=-L--export-dynamic -I% P%/../import -L-L% P%/../lib -L-lrt It is generated automatically from src/dmd.conf.default while building dmd as such: make -f posix.mak install Here is the explanation from man ld of the Mac OS X equivalent: -export_dynamic Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This option is used when a main executable may load a plug-in which requires certain symbols from the main executable. Not sure what -lrt is thought. It is not defined in the man pages, does not affect building of the libraries (druntime or phobos) but bombs out while building the tools. Regards, -------------------- http://www.akeron.co auto getAddress() { string location = " ", period = "."; return ("info" ~ location ~ "afidem" ~ period ~ "org"); }I am having little problem building druntime on Mac OS X 10.9 (Mavericks) and am wondering if anyone has experienced with this and some guidance on how to fix it. Here is my command: make -f posix.mak install DMD=../install/bin/dmd And here is the resulting error: ../install/bin/dmd -ofgenerated/osx/default/rdmd rdmd.d ld: unknown option: --export-dynamic clang: error: linker command failed with exit code 1 (use -v to see invocation) --- errorlevel 1 make: *** [generated/osx/default/rdmd] Error 1--export-dynamic doesn't come from the makefile but most likely from dmd.conf. It's used on Linux and FreeBSD but not on Mac OS X, please remove it. BTW where did you get the dmd.conf file from?
Nov 16 2013
On 2013-11-16 16:39, Andrew Edwards wrote:You nailed it. It is in the dmd.conf file. Its content is this: [Environment] DFLAGS=-L--export-dynamic -I% P%/../import -L-L% P%/../lib -L-lrt It is generated automatically from src/dmd.conf.default while building dmd as such: make -f posix.mak installI see. I have never used "install" for DMD before. dmd.conf shipping in the zip does not have -L--export-dynamic.Here is the explanation from man ld of the Mac OS X equivalent: -export_dynamic Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This option is used when a main executable may load a plug-in which requires certain symbols from the main executable. Not sure what -lrt is thought. It is not defined in the man pages, does not affect building of the libraries (druntime or phobos) but bombs out while building the tools.It's liking with the "rt" library. That is, librt.dylib or librt.a. This is neither used on Mac OS X. I'm guessing "make -f posix.mak install" will generate a dmd.conf file for Linux. -- /Jacob Carlborg
Nov 16 2013
On 11/16/2013 04:39 PM, Andrew Edwards wrote:It is generated automatically from src/dmd.conf.default while building dmd as such: make -f posix.mak installThe install target is work in progress. We want to use this to build releases, but it's not ready yet.Here is the explanation from man ld of the Mac OS X equivalent: -export_dynamic Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This option is used when a main executable may load a plug-in which requires certain symbols from the main executable.This is currently used for backtrace support.Not sure what -lrt is thought. It is not defined in the man pages, does not affect building of the libraries (druntime or phobos) but bombs out while building the tools.The -lrt links in the Realtime Extensions library (librt) which is needed for some functions used by druntime (sched_*, sem_*).
Nov 16 2013
On 11/16/13, 12:59 PM, Martin Nowak wrote:On 11/16/2013 04:39 PM, Andrew Edwards wrote:What else is missing for the OS X build? After correcting the DFLAGS in dmd.conf, it performs as expected.It is generated automatically from src/dmd.conf.default while building dmd as such: make -f posix.mak installThe install target is work in progress. We want to use this to build releases, but it's not ready yet.The -lrt links in the Realtime Extensions library (librt) which is needed for some functions used by druntime (sched_*, sem_*).Which, when built on Mac OS X, turns out to be -ldruntime-osxdefault. I manually changed dmd.conf to: DFLAGS=-L-export_dynamic -I% P%/../import -L-L% P%/../lib -L-ldruntime-osxdefault I've not experienced any issues since.
Nov 16 2013
On 2013-11-16 23:13, Andrew Edwards wrote:What else is missing for the OS X build? After correcting the DFLAGS in dmd.conf, it performs as expected.Nothing.I manually changed dmd.conf to: DFLAGS=-L-export_dynamic -I% P%/../import -L-L% P%/../lib -L-ldruntime-osxdefault I've not experienced any issues since.Please remove -L-ldruntime-osxdefault. druntime is statically linked with Phobos which DMD automatically links with. -L-export_dynamic has never been used on Mac OS X. I don't remember why it was added to the Linux dmd.conf file. -- /Jacob Carlborg
Nov 17 2013
On 11/17/13, 5:34 AM, Jacob Carlborg wrote:Please remove -L-ldruntime-osxdefault. druntime is statically linked with Phobos which DMD automatically links with.Done.-L-export_dynamic has never been used on Mac OS X. I don't remember why it was added to the Linux dmd.conf file.Removed also. I have couple issues remaining for Mac OS X that I'm hoping you can provide some clarification on: 1) The install option for TOOLS, unlike DMD, DRUNTIME or PHOBOS attempts to install the generated binaries directly to /usr/local/bin/. Better to insert them in ../install/bin/ like the other three allowing for automatic inclusion in the release zip and installer. 2) Executing DMD with no arguments displays the version number, copyright, and usage info of course. Whether building from the v2.064 or v2.064.2 tag on github, the resulting binary always displays "DMD64 D Compiler v2.064-devel-a9eedd1". How do I get it to build in the correct version? The VERSION file is present in the git clone but for some reason it is ignored?
Nov 17 2013
On 2013-11-17 17:32, Andrew Edwards wrote:I have couple issues remaining for Mac OS X that I'm hoping you can provide some clarification on: 1) The install option for TOOLS, unlike DMD, DRUNTIME or PHOBOS attempts to install the generated binaries directly to /usr/local/bin/. Better to insert them in ../install/bin/ like the other three allowing for automatic inclusion in the release zip and installer.I don't know. This doesn't seem specific to Mac OS X. I guess what's ever making it easier to automate releases.2) Executing DMD with no arguments displays the version number, copyright, and usage info of course. Whether building from the v2.064 or v2.064.2 tag on github, the resulting binary always displays "DMD64 D Compiler v2.064-devel-a9eedd1". How do I get it to build in the correct version? The VERSION file is present in the git clone but for some reason it is ignored?Try the latest HEAD. For me that correctly updates the version number and the git hash. -- /Jacob Carlborg
Nov 18 2013
On 11/18/13, 3:13 AM, Jacob Carlborg wrote:On 2013-11-17 17:32, Andrew Edwards wrote:That is good but we will be building from a branch when it's time to prepare the binaries. Or do we first prepare the binaries then branch? Any idea how I access and run the auto tester from my machine? I've tried contacting Brad Anderson but no response. Maybe I had the wrong email address. This is the script I use to build DMD. It currently assumes there is a file (VERSION) in the current folder containing an existing branch tag (2.064, 2.064.2, etc...), retrieves the relevant repositories (DMD, PHOBOS, DRUNTIME and TOOLS), builds them, and produces a gz2 and dmg file in the $HOME directory. It is very brittle so any suggestions to make it more usable would be appreciated. The end goal is to run it as the last step in the auto tester which will eliminate more than half of the commands it currently contains. <begin file> mkdir -p .work && cd .work getdmd="git clone -q --progress -bv$(<~/VERSION) https://github.com/D-Programming-Language"; $getdmd"/dmd.git"; $getdmd"/druntime.git"; $getdmd"/phobos.git"; $getdmd"/tools.git"; cd dmd; make -f posix.mak install; cat ../install/bin/dmd.conf | sed "s/-L--export-dynamic //g" > ../install/bin/dmd.conf2 cat ../install/bin/dmd.conf2 | sed "s/-L-lrt//g" > ../install/bin/dmd.conf rm ../install/bin/dmd.conf2 make -C ../druntime -f posix.mak install DMD=../install/bin/dmd make -C ../phobos -f posix.mak install DMD=../install/bin/dmd make -C ../tools -f posix.mak install DMD=../install/bin/dmd mv ../tools/generated/osx/default/catdoc ../install/bin mv ../tools/generated/osx/default/changed ../install/bin mv ../tools/generated/osx/default/ddemangle ../install/bin mv ../tools/generated/osx/default/detab ../install/bin mv ../tools/generated/osx/default/dget ../install/bin mv ../tools/generated/osx/default/rdmd ../install/bin mv ../tools/generated/osx/default/tolf ../install/bin ditto ../install ~/.dmg/usr/share/dmd ditto -jc --keepParent ~/.dmg/usr/share/dmd ~/dmd.$(<~/VERSION).bz2 mkdir -p ~/.dmg/etc/paths.d cat >~/.dmg/etc/paths.d/dmd <<'EOT' /usr/share/dmd/bin /usr/share/dmd/man/man1 EOT mkdir -p dmd.$(<~/VERSION) cat >dmd.$(<~/VERSION)/uninstall.command <<'EOT' sudo -p "Please provide your password to uninstall DMD: " rm -rf /usr/share/dmd sudo -p "Please provide your password to uninstall DMD: " rm -f /etc/paths.d/dmd echo "Uninstallation complete!\n" EOT chmod +x dmd.$(<~/VERSION)/uninstall.command pkgbuild --identifier org.dlang.pkg.app --root ~/.dmg dmd.$(<~/VERSION)/dmd.$(<~/VERSION).pkg hdiutil create -ov -srcfolder dmd.$(<~/VERSION) ~/dmd.$(<~/VERSION).dmg cd ~ && rm -rf .dmg .work </end file>I have couple issues remaining for Mac OS X that I'm hoping you can provide some clarification on: 1) The install option for TOOLS, unlike DMD, DRUNTIME or PHOBOS attempts to install the generated binaries directly to /usr/local/bin/. Better to insert them in ../install/bin/ like the other three allowing for automatic inclusion in the release zip and installer.I don't know. This doesn't seem specific to Mac OS X. I guess what's ever making it easier to automate releases.2) Executing DMD with no arguments displays the version number, copyright, and usage info of course. Whether building from the v2.064 or v2.064.2 tag on github, the resulting binary always displays "DMD64 D Compiler v2.064-devel-a9eedd1". How do I get it to build in the correct version? The VERSION file is present in the git clone but for some reason it is ignored?Try the latest HEAD. For me that correctly updates the version number and the git hash.
Nov 21 2013
On 11/21/13, 6:17 AM, Andrew Edwards wrote:Any idea how I access and run the auto tester from my machine? I've tried contacting Brad Anderson but no response. Maybe I had the wrong email address.Messed that up... I meant Brad Roberts.
Nov 21 2013
On 2013-11-21 12:17, Andrew Edwards wrote:That is good but we will be building from a branch when it's time to prepare the binaries. Or do we first prepare the binaries then branch?They should be built from a branch.Any idea how I access and run the auto tester from my machine? I've tried contacting Brad Anderson but no response. Maybe I had the wrong email address.No, you can try here as well: http://forum.dlang.org/group/dmd-internals. Brad usually post there when something happens with the auto tester.This is the script I use to build DMD. It currently assumes there is a file (VERSION) in the current folder containing an existing branch tag (2.064, 2.064.2, etc...), retrieves the relevant repositories (DMD, PHOBOS, DRUNTIME and TOOLS), builds them, and produces a gz2 and dmg file in the $HOME directory. It is very brittle so any suggestions to make it more usable would be appreciated. The end goal is to run it as the last step in the auto tester which will eliminate more than half of the commands it currently contains.Have you seen this: https://github.com/D-Programming-Language/installer/pull/24 Also we already have a script that creates an installer for Mac OS X: https://github.com/D-Programming-Language/installer/tree/master/osx Better to use what we already have. -- /Jacob Carlborg
Nov 21 2013
On 11/21/13, 7:23 AM, Jacob Carlborg wrote:On 2013-11-21 12:17, Andrew Edwards wrote:Have you seen this:I have.https://github.com/D-Programming-Language/installer/pull/24 Also we already have a script that creates an installer for Mac OS X: https://github.com/D-Programming-Language/installer/tree/master/osxNoted.Better to use what we already have.I've looked at this. But what we have assumes that there is already a zip file present, fetches the zip and from that generates the an installer. My understanding is that the intent is to build the installer directly form the source on guthub. If my understanding is correct, then it either requires me to get the source and build it myself or have the the auto tester do the building and subsequently generating the installer. As I understand it, the second option is the desired desired state. If my understanding is incorrect. I would appreciate clarification.
Nov 21 2013
On 2013-11-21 13:43, Andrew Edwards wrote:I have.So, why don't you use that instead of creating a completely new script?I've looked at this. But what we have assumes that there is already a zip file present, fetches the zip and from that generates the an installer. My understanding is that the intent is to build the installer directly form the source on guthub. If my understanding is correct, then it either requires me to get the source and build it myself or have the the auto tester do the building and subsequently generating the installer. As I understand it, the second option is the desired desired state. If my understanding is incorrect. I would appreciate clarification.Yes, it would be preferred if it was built from source. But the solution is not to start from scratch and create a completely new script. As I said, use what we already have. If that's not working as we want it to, then we change it to do that. You're missing several things when building the installer. BTW, if you're able to figure out how to build the Mac OS X installer on Linux Walter would appreciate it. I failed to do that. -- /Jacob Carlborg
Nov 21 2013
On Thursday, 21 November 2013 at 13:56:07 UTC, Jacob Carlborg wrote:BTW, if you're able to figure out how to build the Mac OS X installer on Linux Walter would appreciate it. I failed to do that.this might help: https://github.com/hogliux/bomutils
Nov 21 2013
On 2013-11-21 18:18, Joshua Niehus wrote:On Thursday, 21 November 2013 at 13:56:07 UTC, Jacob Carlborg wrote:Yeah, I tried that, it didn't work. It's not just the Bom file that is causing troubles. I tried to extract an installer and then created an archive of its content using "xar", that's the file type the "file" command returned. I could run the installer but it failed to complete the installation. -- /Jacob CarlborgBTW, if you're able to figure out how to build the Mac OS X installer on Linux Walter would appreciate it. I failed to do that.this might help: https://github.com/hogliux/bomutils
Nov 21 2013
On 11/21/13, 8:56 AM, Jacob Carlborg wrote:On 2013-11-21 13:43, Andrew Edwards wrote:To be honest, I started with the existing script. I would have loved to simply download and execute it and everything worked but it did not. It required more than an standard install of MAC OS X and the command line tools. Since I didn't have the full version of XCode or the particular products prompted for, I chose the route that required less preparatory work by the potential user. I do understand the necessity to build upon what already exists and, trust me, that's what I wanted to do.I have.So, why don't you use that instead of creating a completely new script?I've looked at this. But what we have assumes that there is already a zip file present, fetches the zip and from that generates the an installer. My understanding is that the intent is to build the installer directly form the source on guthub. If my understanding is correct, then it either requires me to get the source and build it myself or have the the auto tester do the building and subsequently generating the installer. As I understand it, the second option is the desired desired state. If my understanding is incorrect. I would appreciate clarification.Yes, it would be preferred if it was built from source. But the solution is not to start from scratch and create a completely new script. As I said, use what we already have. If that's not working as we want it to, then we change it to do that.You're missing several things when building the installer.Would have been great if you pointed them out but I completely understand.BTW, if you're able to figure out how to build the Mac OS X installer on Linux Walter would appreciate it. I failed to do that.Will give it a shot. Thanks. -- Regards, -------------------- http://www.akeron.co auto getAddress() { string location = " ", period = "."; return ("info" ~ location ~ "afidem" ~ period ~ "org"); }
Nov 22 2013
On Saturday, 23 November 2013 at 00:16:33 UTC, Andrew Edwards wrote:To be honest, I started with the existing script. I would have loved to simply download and execute it and everything worked but it did not. It required more than an standard install of MAC OS X and the command line tools. Since I didn't have the full version of XCode or the particular products prompted for, I chose the route that required less preparatory work by the potential user. I do understand the necessity to build upon what already exists and, trust me, that's what I wanted to do.I would have asked what's needed to build the installer instead of starting from scratch. What you need from that script is PackageMaker. Apparently it has been deprecated but it's still useable. It can be download here: https://developer.apple.com/downloads. It's part of "Auxiliary tools for Xcode Late July 2012", it requires a free developer account. It's expected to be installed in /ApplicationsWould have been great if you pointed them out but I completely understand.I can do that in a new post. I just thought it would be easier to use the existing scripts. -- /Jacob Carlborg
Nov 23 2013
On Thursday, 21 November 2013 at 11:18:44 UTC, Andrew Edwards wrote:Since this script will only be run on Mac OS X there's no point in using the "env" command. Just hardcode the path to Bash.mkdir -p .work && cd .work getdmd="git clone -q --progress -bv$(<~/VERSION) https://github.com/D-Programming-Language"; $getdmd"/dmd.git"; $getdmd"/druntime.git"; $getdmd"/phobos.git"; $getdmd"/tools.git"; cd dmd; make -f posix.mak install; cat ../install/bin/dmd.conf | sed "s/-L--export-dynamic //g" > ../install/bin/dmd.conf2 cat ../install/bin/dmd.conf2 | sed "s/-L-lrt//g" > ../install/bin/dmd.conf rm ../install/bin/dmd.conf2Don't patch dmd.conf. Change the makefile to do the right thing from the beginning.make -C ../druntime -f posix.mak install DMD=../install/bin/dmd make -C ../phobos -f posix.mak install DMD=../install/bin/dmd make -C ../tools -f posix.mak install DMD=../install/bin/dmd mv ../tools/generated/osx/default/catdoc ../install/bin mv ../tools/generated/osx/default/changed ../install/bin mv ../tools/generated/osx/default/ddemangle ../install/bin mv ../tools/generated/osx/default/detab ../install/bin mv ../tools/generated/osx/default/dget ../install/bin mv ../tools/generated/osx/default/rdmd ../install/bin mv ../tools/generated/osx/default/tolf ../install/binNot all of these tools are currently shipped with DMD. Don't know if we want to include all of these. We should probably start a new post about it.ditto ../install ~/.dmg/usr/share/dmd ditto -jc --keepParent ~/.dmg/usr/share/dmd ~/dmd.$(<~/VERSION).bz2 mkdir -p ~/.dmg/etc/paths.d cat >~/.dmg/etc/paths.d/dmd <<'EOT' /usr/share/dmd/bin /usr/share/dmd/man/man1 EOT mkdir -p dmd.$(<~/VERSION) cat >dmd.$(<~/VERSION)/uninstall.command <<'EOT' sudo -p "Please provide your password to uninstall DMD: " rm -rf /usr/share/dmd sudo -p "Please provide your password to uninstall DMD: " rm -f /etc/paths.d/dmdDon't remove the whole directory like that. Explicitly remove all files the installer put there and then remove the directory if it's empty. The user could have placed some own files in that directory. It happened with the latest Windows installer resulting in some angry posts.echo "Uninstallation complete!\n" EOT chmod +x dmd.$(<~/VERSION)/uninstall.command pkgbuild --identifier org.dlang.pkg.app --root ~/.dmg dmd.$(<~/VERSION)/dmd.$(<~/VERSION).pkg hdiutil create -ov -srcfolder dmd.$(<~/VERSION) ~/dmd.$(<~/VERSION).dmgYou're not using the dmd2.pmdoc file or corresponding. That will result in missing readme, licenses and other information.cd ~ && rm -rf .dmg .work </end file>-- /Jacob Carlborg
Nov 23 2013