I first attempted this by getting the stock source from OpenSSL's website. That wasn't fun.
Then I clued in, and I got the source from here.
When I try to build from Xcode, it fails with several warnings and 1 error.
/Users/x/OpenSSL098-OpenSSL098-76.200.2/src/crypto/x509/x509_vfy_apple.c:29:10: Did not find header 'TrustEvaluationAgent.h' in framework 'TrustEvaluationAgent' (loaded from '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/PrivateFrameworks')
I had assumed that the patches included in this tarball were already applied, and when I attempt to run the bash script to do that, it complains that there is no (openssl) source tarball... that's ok (I think), there is already a populated src/ directory. I modified the bash script enough that it would ignore that, and indeed, when it goes to patch it gripes the patches are already applied. The README.rtf file (Apple's) is suggestive that this is only if I wish to use the patches against a later version of the source, which I'm not much interested in.
It's not clear to me if my Xcode is just mangled beyond recognition, if I'm missing some dependency, or if I don't know what I'm doing within the Xcode interface (much more comfortable on the command line).
I did find this, which seems like a related issue... but I cannot find the source code he suggests needs to be uncommented (nor how to remove the references from the project file).
Can anyone point me in the right direction?
But for the unclear English, the instructions in the second link are correct.
Delete the x509_vfy_apple.c file from the treeview on the left, it will be in the Source/crypto/x509 folder. Then in x509_vfy.c (same folder), there will be an #if directive near line 76. It's defined as...
#if __APPLE__
Make that...
#if 0
Somehow I brainfarted on this and made it #if 1 on the first try, and then dismissed the instructions as not working. Commenting this out would also work, or just nuking the entire directive for that matter.
Still seems to compile with a zillion warnings, but I'm not even sure that just isn't what you get with a 7 year old version of openssl.
Related
I was wondering about the BII_IMPLICIT_RULES_ENABLED flag which I had switched off in one of my CMakeLists.txt files, in order to get an OpenGL related block to compile on a Mac, following a suggestion from biicode. This setting is still there and everything works perfectly, but I would like to find out more about it. Could someone explain what it does exactly?
Thanks!
BII_IMPLICIT_RULES_ENABLED activates the addition of system libs to the target that has included certain headers. For example, if your code contains an:
#include "math.h"
And you are in *nix systems, then the library "m" (libm) will be added to your target via TARGET_LINK_LIBRARIES.
You can see the headers that are processed in your cmake/biicode.cmake file, in the HANDLE_SYSTEM_DEPS
My recommendation: Put it to False whenever possible, and handle the required system libs yourself, exactly what you have done. It is something that will be deprecated soon, or at least set to False by default to new projects. This option sometimes causes troubles, if something fails or there is a bug in biicode.cmake, e.g. in the past it tried to add libm to targets also in windows. It will be gradually deprecated and probably substituted by some CMake macros hosted (as in http://www.biicode.com/biicode/cmake) that could be used by users if they decide to, but not automatically as it is done now.
I've been struggling to get Auto Talent from Oli Larkin to compile for some time now. I'm pretty new to Xcode and that may be the issue, but either way I figured I'd see if anyone could help me. I'm trying to compile this in order to make a 64 bit version.
Starting from the top:
I've traced down a few things that I thought were the issues.
Noticed that wdl sdk was missing. Downloaded it from https://github.com/olilarkin/wdl-ol. Added the wdl folder outside of the src folder.
Got some warnings when starting up Xcode 5.0.2. Let Xcode fix them.
Realized that the /Developer/Examples folder doesn't exist in Mavericks. Found https://developer.apple.com/library/mac/samplecode/CoreAudioUtilityClasses/Introduction/Intro.html#//apple_ref/doc/uid/DTS40012328-Intro-DontLinkElementID_2, downloaded the sample code, linked to AUBase as I realized this path needed updating in the AU Build Settings (see screenshot).
iPlug.xcodeproj is in red. Not sure what to do about this. Any ideas? I'm assuming it's important.
Update: Based on the recent comments, I'm now getting somewhere. But, at the moment I'm getting the following errors. This has to do with not having a Lice SDK or something. Is this absolutely needed? If so, do you have the time to elaborate on this and where to get it? Thanks again for all of the help.
It looks like I'm getting another issue as well related to clang. Maybe related to Xcode - Command /Developer/usr/bin/clang failed with exit code 1, not sure.
Note: Before finally getting to the errors above, I had to...
Link CoreMIDI.framework "Frameworks and Libraries" -> "Linked Frameworks" -> App to /System/Library/Frameworks/CoreMIDI.framework.
Set compiler in the build settings to default compiler. Otherwise it said unsupported compiler and threw some warnings. Hopefully this didn't mess anything up.
Rename aeffect.h and aeffectx.h to aeffect.h and aeffectx.h from the VST3 SDK. You can find these files in public.sdk -> source -> vst2.x. Apparently 2.x isn't really supported anymore. After renaming them, I moved them to the VST_SDK folder in WDL as the readme instructed.
the source you have will not compile straight off with recent versions of WDL-OL, since lots has changed. The way to upgrade it is to strip out the pertinent source code (i.e. autotalent.h/cpp and the mayer fft stuff) and re-duplicate one of the template projects in WDL-OL and bring it in to the new folder.
I've done it for you:
https://github.com/olilarkin/autotalent
you can clone this repository into the IPlugExamples folder of WDL-OL, and provided you've put all the SDK files in place it should compile straight off.
oli
While trying to get the template Xcode 4 ogre project to work, the build fails because it can't find OgreCamera.h.
I've installed Ogre to /opt/local/lib/OGRE, and specified that as the Ogre SDK location when creating the Xcode 4 project.
Needless to say, the header and framework include paths in the project settings point exactly to where all the header files are, yet not one of them can be found. I've tried commenting out the include of OgreCamera.h, and upon trying to run, the next include, OgreEntity.h, cannot be found. Commenting that out and running again, the next include can't be found, and so on (these includes are in OgreFramework.h.
I don't understand why these headers, which clearly exist when I go look for them in the Finder or Terminal, can't be found by the project, even when I specify their full path like this:
#include </opt/local/lib/OGRE/lib/release/Ogre.framework/Versions/1.7.4/Headers/OgreCamera.h>
Did I somehow install the Ogre SDK incorrectly? (I copied it from the DMG into place…)
I had the same problem, and found partial success by following rjstelling's answer from this thread:
why can't Xcode find this header file?
That solved the OgreCamera.h include issues, but now I'm stuck on including the boost libraries. They are not picked up on the search paths, or in the Indexing group as suggested in the thread above.
Basically it looks like a bug in XCode4 that has to be worked around until a patch is released. There is also more information here:
Compile, Build or Archive problems with Xcode 4 (and dependencies)
There is a bug in RHEL5's gcc-4.3.2 with which we are stuck. As a work-around we have extracted the missing object and put it in an object file. Adding this object file to every link makes the problem go away.
While adding it directly to LDFLAGS seems like a good solution, this doesn't work since e.g. libtool cannot cope with non-la files in there.
A slightly more portable solution seems to be to directly patch the gcc spec to add this to every link. I came up with
*startfile:
+ %{shared-libgcc:%{O*:%{!O0:/PATH/TO/ostream-inst.o}}}
where ostream-inst.o is added to the list of startfiles used in the link when compiling a shared library with optimizations.
Trying to compile boost with this spec gives some errors though since its build directly sets some objects with ld's --startgroup/--endgroup.
How should I update that spec to cover that case as well, or even better, all cases?
Go through this URL Specifying subprocesses and the switches to pass to them and GCC Command Options
If this help you, thats great.
I know this is not the answer you want to hear (since you specified otherwise in your question), but you are running into trouble here and are likely to run into more since your compiler is buggy. You should find a way of replacing it, since you'll find yourself writing even more work-around code the next time some obscure build system comes along. There's not only bjam out there.
Sorry I can't help you more. You might try simply writing a .lo file by hand (it's a two-liner, after all) and insert it into your LDFLAGS.
If it is a bug of GCC 4.3, did you try to build (by compiling from sources) and use a newer GCC. GCC 4.6.2 is coming right now. Did you consider using it?
I've been interested in "D" for a couple of years now and recently decided to start actually playing with it. I've been able to grasp the basics quite easily, I love the basic feature set of the language and the more I read about it, the more impressed I get.
Now, I'm very interested in writing a custom web application server as a hobby project and I want it to be a simple binary, using dynamically linked libraries for the actual web applications. I believe D to be the perfect language for this venture.
There is only one big problem... over the past couple of days, I have been completely unable to get any kind of IDE setup working. I can compile and run everything just fine on the command line, but everything I try in any of the IDE's available (Code::Blocks, eclipse+descent, Xcode with D plugin, and even the windows D-IDE running in VirtualBox on Windows XP Pro) the only thing that ever happens is:
object.d: Error: module object cannot read file 'object.d'
After two days of trying different things and following tutorials, this is really getting on my nerves. I want to learn to use D efficiently, but I need some comfy tool chain that includes code completion in the editor if I want to keep my sanity, which I obviously do.
[edit:added emphasis to the really important bit]
Is there anyone that can help me set up eclipse or (preferably) netbeans (but no plugin seems to be publicly available) to give me compile and run abilities in the IDE, along with code completion? on my Mac, running Mac OS X 10.6?
I want to use the phobos libraries (and therefor a 2.0 compiler) but I don't really care if its dmd or gdmd (gdcmac).
[addition]
I believe we can assume that my dmd compiler installation is in order because it works from the commandline. I just don't want to use it from the commandline because its tedious. The question is about and IDE, the compiler works, its just IDEs that won't
Well, the persistent bugger in me could not leave the problem alone and I finally got it to work.
The required components to get it all working on Mac OS X 10.6 are:
DMD compiler
Eclipse "Galileo" (version 3.4)
Descent
DSSS
a change to /usr/etc/rebuild/default
a new file i hacked together /usr/etc/rebuild/macosx.conf
global and per-project settings for Eclipse
After following these instructions you'll have Eclipse able to do code completion on your D projects and you'll be able to build/run from within the IDE as well.
The actual steps to get it operational are as follows.
install the digitalmars dmd 2.0 compiler
download the binary distribution from digitalmars.com (direct link to 2.041)
unzip the downloaded file into ~/somefolder (that created a ~/somefolder/dmd2 folder for me which I'll use for the duration of this example.)
in the terminal (/Applications/Utilities/Terminal.app) move the files to their destination
sudo mv ~/somefolder/dmd2/osx/bin/* /usr/bin/ enter your login password when asked
move the just copied dmd.conf to its location: sudo mv /usr/bin/dmd.conf /etc/dmd.conf
sudo mv ~/somefolder/dmd2/osx/lib/* /usr/lib/
sudo mv ~/somefolder/dmd2 /usr/
use your favorite text editor to edit /etc/dmd.conf to contain the following:
[Environment]
DFLAGS=-I/usr/dmd2/src/phobos -I/usr/dmd2/src/druntime/import -L-L/usr/lib
Download and install your favorite Mac OS X version of eclipse out of the umpteen hundreds available at http://www.eclipse.org/downloads/ (I picked a cocoa version for c/c++)
Install Descent (almost as per the normal instructions in the wiki)
run Eclipse (don't bother running as root)
goto Help -> Install New Software from the menu bar. (wtf does that do in the Help menu?!)
copy/paste http://downloads.dsource.org/projects/descent/update-site into the url field.
follow on screen instructions to finish installation.
install dsss from sourceforge (direct link to .dmg)
use the installer package on the disk image like any other.
create a file /usr/etc/rebuild/macosx.conf and paste the following snippet into it. (and save, duh)
profile=phobos
compiler=dmd
inifile=dmd.conf
exeext=
objext=o
version=DigitalMars
noversion=GNU
version=MacOSX
version=linux
noversion=Unix
noversion=Posix
noversion=Windows
noversion=Win32
noversion=Win64
version=X86
noversion=PPC
noversion=X86_64
version=D_InlineAsm
version=D_InlineAsm_X86
noversion=D_InlineAsm_PPC
noversion=D_InlineAsm_X86_64
version=LittleEndian
noversion=BigEndian
[compile]
cmd=dmd -version=MacOSX -c $i
flag=$i
incdir=-I$i
libdir=-L-L$i
optimize=-O
version=-version=$i
[link]
oneatatime=yes
#cmd=dmd -L-lphobos $i -of$o
cmd=dmd $i -of$o
# cmd=dmd -L--start-group -L-lphobos $i -of$o
libdir=-L-L$i
lib=-L-l$i
flag=-L$i
[liblink]
safe=yes
oneatatime=yes
cmd=if [ ! -z "$o" ]; then ar rc $o $i; fi
libdir=
lib=
flag=
[postliblink]
cmd=ranlib $i
[shliblink]
shlibs=no
[dyliblink]
dylibs=no
change the /usr/etc/rebuild/default file to read: profile=dmd-macosx
Set up Eclipse to have code completion
In the global eclipse preferences navigate tp D => Build Path => User Libraries
click New, type "std", press OK select the newly created entry, click Add Directory
navigate to /usr/dmd2/src/phobos/std and add it.
Set up Eclipse project.
You have to do this manually for every D project you'll make
Create a new project with the "D => D Project" wizard (thanks to Descent)
Go into project properties (right click project in the Project Explorer and choose Properties)
In the list to the left select D Build Path and in the panel that appears choose the Include Path tab.
Click the Add Library button and choose std in the second page of the wizard.
Configure the extarnal build tool
Go to External tools configurations... (from the dropdown in the little green play button with the toolbox in front of it in the build/run/debug toolbar thingy)
In the list to the left right click Program and choose New from the context menu.
give your config a decent name like "Build with dsss" and set the following options:
Location: /usr/bin/dsss
Working Directory: full path to directory with your dsss.conf file for the project
(if you don't have a dsss.conf file create one on the commandline: dsss genconfig)
Arguments: build (or rebuild, or clean, or...)
repeat steps 2 and 3 above for as many build/run options as you require.
Congratulations, everything should work now.
If for some reason this does not work for you, let me know and I'll be happy to figure out where it went wrong and help you to get it working. If there's a better or simpler way, I'd love to know about it as well.
object.d: Error: module object cannot read file 'object.d'
clearly indicates that it can't find the libraries properly. So, the first question is how your dmd.conf is set up. You need to make sure that it's pointing to the correct places for src/phobos, src/druntime/import, and osx/lib - wherever you put those. Personally, I put the dmd code in a subfolder of home and don't try and install it in /usr, but the instructions do tell you to install them there as the default, so it should work.
Assuming that your dmd.conf looks okay, the most likely situation is that it's actually using the wrong dmd.conf. Per the instructions on the digital mars site ( http://www.digitalmars.com/d/2.0/dmd-osx.html ):
dmd will look for the initialization file dmd.conf in the following sequence of directories:
1. current working directory
2. directory specified by the HOME environment
3. variable directory dmd resides in
4. /etc/
My guess is that you put dmd.conf in /etc and have been editing that one but left the original dmd.conf in
/where_dmd_is/dmd2/osx/bin/
Certainly, I've had that happen to me a time or two. In any case, the first thing that you need to make sure of is that the dmd.conf that you're editing is the one that dmd is using (so make sure that the places where dmd looks first don't have a dmd.conf), and the second thing that you need to make sure of is that the paths in your dmd.conf correctly point to where the dmd stuff is. If those two things are correct, then dmd should find the libraries correctly.
On a side note, I would point out, however, given your comment about wanting to use shared libraries is that shared libraries don't work correctly with D2 right now (I have no idea whether they work with D1 since I don't use D1 - I suspect that they don't though). There have been discussions about it on the D newsgroup ( http://www.digitalmars.com/NewsGroup.html ), so you can look there. It is something on the radar and is being looked into, but doesn't fully work yet. Also, you can look to the newsgroup for further help on D-related issues. It's probably the best place to ask right now.
If it's a question of an IDE, as far as eclipse goes, I believe that the plugin to look at is descent: http://www.dsource.org/projects/descent
Unfortunately, I haven't tried it myself yet, so I don't know how good it is. According to its wiki page, it's primarily intended for D1 but does support D2 to at least some extent.
If you wanna get started quickly (aka Double-click-install): D for Xcode
Requirements:
Xcode
That's it. Installs the latest dmd compiler, so it works in Terminal too etc.
As i keep seeing this question coming back in my search results every now and then, I figured I'd keep it relevant.
Nowadays; In the Mountain Lion era, a much easier solution exists in the Mono-D project
Just install MonoDevelop (or Xamarin Studio) and follow the five minute installation manual
(You can use Phobos on D 1.0. Anyway…)
Where did you install the Phobos and druntime headers?
<the .zip file>/src/druntime/
<the .zip file>/src/phobos/
Usually I copy them into /usr/include.
(Also, try to edit dmd.conf to use the absolute path:
[Environment]
DFLAGS=-I/usr/include/phobos -I/usr/include/druntime/import -L-L/usr/lib
)