Objective-Smalltalk icon indicating copy to clipboard operation
Objective-Smalltalk copied to clipboard

README.ms instructions build failing

Open sebastianconcept opened this issue 2 years ago • 12 comments

Hi @mpw , I'd like to build the stsh scheme it but I'm stuck with this error

MPWFoundation/MPWFoundation.h' file not found

Do I have to manually add it somehow?

I did try to build MPWFoundation in a sibling dir, it did built with some warnings.

But then on Objective-Smalltalk I have that file not found issue.

Is a patch issue? What I am missing?

XCode 13.4.1

sebastianconcept avatar Aug 13 '22 18:08 sebastianconcept

Did you follow step 3 in the README?

  1. Open Objective-Smalltalk/objective-smalltalk.xcworkspace

mpw avatar Aug 13 '22 20:08 mpw

Ah, I've overlooked and opened ObjectiveSmalltalk.xcodeproj instead.

I see objective-smalltalk.xcworkspace build both projects.

Now when I build objective-smalltalk.xcworkspace goes well until this 1 error:

'ObjectiveSSH/SSHConnection.h' file not found

sebastianconcept avatar Aug 13 '22 21:08 sebastianconcept

Hmm...I may have been a bit too clever trying to work around the difficulty of building libssh fat.

In MPWFoundation, build the ObjectiveSSH target once manually. That should put the headers where they are needed.

mpw avatar Aug 13 '22 21:08 mpw

Thanks for the follow up Marcel.

When doing that, it complain about lack of team for signing the build. I've set my personal team and when retrying the build, I've got:

'libssh/libssh.h' file not found

Screen Shot 2022-08-13 at 18 16 14

sebastianconcept avatar Aug 13 '22 21:08 sebastianconcept

Seems to expect that lib to be in /usr/local/Cellar/libssh/... and I don't have it there.

Is a version of SSH you installed with brew?

sebastianconcept avatar Aug 13 '22 21:08 sebastianconcept

Yep, brew it was. I keep going back-and-forth on how to integrate external dependencies like that. Quickest/easiest solution is to add your location to the search paths.

mpw avatar Aug 13 '22 21:08 mpw

OK, I've removed the dependency on ObjectiveSSH, by introducing an SSHConnection protocol in MPWFoundation.

That means you should now be able to compile Stsh.framework (and thus stsh) without needing libssh.

mpw avatar Aug 14 '22 15:08 mpw

Thanks @mpw that seems to have helped a lot because the build now goes a long way.

Now I'm stuck with: error: Build input file cannot be found: '/Users/seb/git/Objective-Smalltalk/stsh/stsh-Prefix.pch' (in target 'stsh' from project 'ObjectiveSmalltalk')

sebastianconcept avatar Aug 14 '22 16:08 sebastianconcept

That looks a lot like a generic Xcode build system bug/problem. Typical Xcode incantations should help, starting with cleaning the target, maybe restart Xcode, the works... :-/

mpw avatar Aug 14 '22 16:08 mpw

I've thought that. I did that cleaning and rebuilt but got the same. It could be the version because I've installed an older one for a specific iOS version that I've targeted for some reason. Not important now. I can upgrade.

What XCode version are you using?

sebastianconcept avatar Aug 14 '22 16:08 sebastianconcept

13.4.

Hmm.

mpw avatar Aug 14 '22 17:08 mpw

I've disabled the stsh prefix header in the Build settings of the stsh target.

mpw avatar Aug 14 '22 17:08 mpw