Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors building from source #105

Open
acronce opened this issue May 8, 2022 · 3 comments
Open

Errors building from source #105

acronce opened this issue May 8, 2022 · 3 comments

Comments

@acronce
Copy link

acronce commented May 8, 2022

Thanks for this great project!

I'm trying to build this from source but I'm seeing errors like the following:

sbarex/QLMarkdown/QLMarkdown.xcodeproj Missing package product 'Sparkle'
sbarex/QLMarkdown/QLMarkdown.xcodeproj Missing package product 'Yams'
sbarex/QLMarkdown/QLMarkdown.xcodeproj Missing package product 'SwiftSoup'

There's no mention of these in the readme, and I don't see any submodules for them.

Maybe these should be added to the dependencies folder as submodules?

@sbarex
Copy link
Owner

sbarex commented May 8, 2022

All these modules are managed via the swift package. Xcode should automatically download the dependencies.

@acronce
Copy link
Author

acronce commented May 8, 2022

Thanks for getting back to me. Xcode does seem to download the dependencies, but the targets that depend on them still cannot find them. I see errors building every target except for external-launcher.

Note that I'm using Xcode 13.2.1 and trying to build from the GUI, not the command line.

Looks like other folks have been complaining about this kind of problem since the Xcode 13 beta. Following their advice I tried File -> Packages -> Reset Package Caches and that resolved the missing package messages.

But now when doing a build I see an error from the libpcre2 target:

./dependencies/MakefilePCRE:104: *** No autoreconf in PATH (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin), try install autogen tools with homebrew.  Stop.

I do have the autogen tools installed, but the path is apparently not known to Xcode (but is available from the command line):

/opt/autotools/bin/autoreconf

To work around this, I added the following user defined env var to the libpcre2 and libjpcre2 targets:

PATH = ${PATH}:/opt/autotools/bin

The next problem is that the highlight-wrapper target produces the following error (for either the Debug or Release config):

make: *** No rule to make target `/Users/acronce/Library/Developer/Xcode/DerivedData/QLMarkdown-ectrneqybndeqrbkrkqvtedzxoho/Build/Products/Debug/libhighlight_arm64.dylyb', needed by `/Users/acronce/Library/Developer/Xcode/DerivedData/QLMarkdown-ectrneqybndeqrbkrkqvtedzxoho/Build/Products/Debug/libhighlight.a'.  Stop.

I don't see any built deliverable with libhighlight in the name. I have not yet figured out this error.

@sbarex
Copy link
Owner

sbarex commented May 9, 2022

Have you downloaded the source code via zip or have you cloned the repository?

highlight-wrapper uses a git submodule that is not preserved by the zip format.

Also, after the repository clone, you must call git submodule update --init to initialize the submodules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants