No, if the directories are separate they are separate to `swift build`.
The problem is it already cloned CCairo into your example, and a dependency manager should not change cloned dependencies as part of the build process.
I agree it is confusing, but I will be adding warnings and information to help here. It’s early days.
···
On Dec 9, 2015, at 1:13 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So would things break if I ran swift build in the CCairo directory and then example? This so confusing...
On Wed, Dec 9, 2015 at 11:19 AM -0800, "Max Howell" <max.howell@apple.com <mailto:max.howell@apple.com>> wrote:
> Gage,
>
> For what it's worth, after running `git init` and `git tag -f 1.0.0`
> in `CCairo` to get something importable, I run into this error:
>
> :; swift build
> Cloning Packages/CCairo
> <unknown>:0: error: no such file or directory:
> '/Users/solidsnack/Downloads/Sources/example/Packages/CCairo/Package.swift’
The PM does not update the git repo, by default this is the right behavior since you should not change your dependency sources every build. However I agree this is confusing in these situations. We plan some sort of “dev mode”.
So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"
No, if the directories are separate they are separate to `swift build`.
The problem is it already cloned CCairo into your example, and a dependency manager should not change cloned dependencies as part of the build process.
I agree it is confusing, but I will be adding warnings and information to help here. It’s early days.
···
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:21 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
On Dec 9, 2015, at 1:13 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So would things break if I ran swift build in the CCairo directory and then example? This so confusing...
On Wed, Dec 9, 2015 at 11:19 AM -0800, "Max Howell" <max.howell@apple.com <mailto:max.howell@apple.com>> wrote:
> Gage,
>
> For what it's worth, after running `git init` and `git tag -f 1.0.0`
> in `CCairo` to get something importable, I run into this error:
>
> :; swift build
> Cloning Packages/CCairo
> <unknown>:0: error: no such file or directory:
> '/Users/solidsnack/Downloads/Sources/example/Packages/CCairo/Package.swift’
The PM does not update the git repo, by default this is the right behavior since you should not change your dependency sources every build. However I agree this is confusing in these situations. We plan some sort of “dev mode”.
On Dec 8, 2015, at 1:09 PM, Max Howell <max.howell@apple.com> wrote:
Chris, adding the C prefix is our recommendation so it is clear at the import statement that the sources in question are using the raw C interface rather than any “Swifty” wrapper.
We hope thus that the community will provide modules that add error handling, default arguments, closures, etc. while (importantly) still maintaining the general API of the C library in question and then name them without the C prefix.
Here is our documentation with further justification:
On Wed, Dec 9, 2015 at 1:21 PM -0800, "Max Howell" <max.howell@apple.com> > wrote:
No, if the directories are separate they are separate to `swift build`.
The problem is it already cloned CCairo into your example, and a
dependency manager should not change cloned dependencies as part of the
build process.
I agree it is confusing, but I will be adding warnings and information to
help here. It’s early days.
On Dec 9, 2015, at 1:13 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So would things break if I ran swift build in the CCairo directory and
then example? This so confusing...
On Wed, Dec 9, 2015 at 11:19 AM -0800, "Max Howell" <max.howell@apple.com> > wrote:
> Gage,
>
> For what it's worth, after running `git init` and `git tag -f 1.0.0`
> in `CCairo` to get something importable, I run into this error:
>
> :; swift build
> Cloning Packages/CCairo
> <unknown>:0: error: no such file or directory:
>
'/Users/solidsnack/Downloads/Sources/example/Packages/CCairo/Package.swift’
The PM does not update the git repo, by default this is the right behavior
since you should not change your dependency sources every build. However I
agree this is confusing in these situations. We plan some sort of “dev
mode”.
So the first time I tried with just cairo, then libcairo. Then I thought it might work with the direct path. So after some frustration with it saying "Module not found," I tried running swift build on both directories and it gave me that output: It recognized the .so file but then went on to say it could not find it, and abruptly quit. So then I wondered: How do I get cairo running? At least I got it installed and working.
So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"
No, if the directories are separate they are separate to `swift build`.
The problem is it already cloned CCairo into your example, and a dependency manager should not change cloned dependencies as part of the build process.
I agree it is confusing, but I will be adding warnings and information to help here. It’s early days.
···
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:27 PM -0800, "Gage Morgan via swift-users" <swift-users@swift.org> wrote:
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:21 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
On Dec 9, 2015, at 1:13 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So would things break if I ran swift build in the CCairo directory and then example? This so confusing...
On Wed, Dec 9, 2015 at 11:19 AM -0800, "Max Howell" <max.howell@apple.com <mailto:max.howell@apple.com>> wrote:
> Gage,
>
> For what it's worth, after running `git init` and `git tag -f 1.0.0`
> in `CCairo` to get something importable, I run into this error:
>
> :; swift build
> Cloning Packages/CCairo
> <unknown>:0: error: no such file or directory:
> '/Users/solidsnack/Downloads/Sources/example/Packages/CCairo/Package.swift’
The PM does not update the git repo, by default this is the right behavior since you should not change your dependency sources every build. However I agree this is confusing in these situations. We plan some sort of “dev mode”.
So I don't have any files named libcairo2.so, while I did have libcairo.so23xxxxx (some numbers after .so). I tried "link: cairo," and it said it could not find the module at all.
Look at the .so file, you put the name without the lib prefix and without the .so suffix.
···
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:58 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"
On Dec 9, 2015, at 2:01 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So I don't have any files named libcairo2.so, while I did have libcairo.so23xxxxx (some numbers after .so). I tried "link: cairo," and it said it could not find the module at all.
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:58 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
Look at the .so file, you put the name without the lib prefix and without the .so suffix.
> So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"
Is there a specific thing I can find on my system that will give me the exact name that I need to link against?
So the first time I tried with just cairo, then libcairo. Then I thought it might work with the direct path. So after some frustration with it saying "Module not found," I tried running swift build on both directories and it gave me that output: It recognized the .so file but then went on to say it could not find it, and abruptly quit. So then I wondered: How do I get cairo running? At least I got it installed and working.
So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"
No, if the directories are separate they are separate to `swift build`.
The problem is it already cloned CCairo into your example, and a dependency manager should not change cloned dependencies as part of the build process.
I agree it is confusing, but I will be adding warnings and information to help here. It’s early days.
···
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:44 PM -0800, "Gage Morgan via swift-users" <swift-users@swift.org> wrote:
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:27 PM -0800, "Gage Morgan via swift-users" <swift-users@swift.org> wrote:
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:21 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
On Dec 9, 2015, at 1:13 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So would things break if I ran swift build in the CCairo directory and then example? This so confusing...
On Wed, Dec 9, 2015 at 11:19 AM -0800, "Max Howell" <max.howell@apple.com <mailto:max.howell@apple.com>> wrote:
> Gage,
>
> For what it's worth, after running `git init` and `git tag -f 1.0.0`
> in `CCairo` to get something importable, I run into this error:
>
> :; swift build
> Cloning Packages/CCairo
> <unknown>:0: error: no such file or directory:
> '/Users/solidsnack/Downloads/Sources/example/Packages/CCairo/Package.swift’
The PM does not update the git repo, by default this is the right behavior since you should not change your dependency sources every build. However I agree this is confusing in these situations. We plan some sort of “dev mode”.
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 3:20 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
On Dec 9, 2015, at 2:01 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So I don't have any files named libcairo2.so, while I did have libcairo.so23xxxxx (some numbers after .so). I tried "link: cairo," and it said it could not find the module at all.
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:58 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
Look at the .so file, you put the name without the lib prefix and without the .so suffix.
> So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"
Yes this is the problem. The path is not searched. We have a big ticket open for this.
···
On Dec 9, 2015, at 3:25 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
/usr/lib/x86_64-linux-gnu/libcairo.so
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 3:20 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
What's the path of your libcairo?
On Dec 9, 2015, at 2:01 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So I don't have any files named libcairo2.so, while I did have libcairo.so23xxxxx (some numbers after .so). I tried "link: cairo," and it said it could not find the module at all.
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:58 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
Look at the .so file, you put the name without the lib prefix and without the .so suffix.
> So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"
Its a real place, but apparently swift fails to recognize it with a "doesn't exist" error.
/usr/lib/x86_64-linux-gnu/libcairo.so
What's the path of your libcairo?
···
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 3:25 PM -0800, "Gage Morgan via swift-users" <swift-users@swift.org> wrote:
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 3:20 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
On Dec 9, 2015, at 2:01 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So I don't have any files named libcairo2.so, while I did have libcairo.so23xxxxx (some numbers after .so). I tried "link: cairo," and it said it could not find the module at all.
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:58 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
Look at the .so file, you put the name without the lib prefix and without the .so suffix.
> So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"
Its a real place, but apparently swift fails to recognize it with a "doesn't exist" error.
/usr/lib/x86_64-linux-gnu/libcairo.so
What's the path of your libcairo?
···
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 3:27 PM -0800, "Gage Morgan via swift-users" <swift-users@swift.org> wrote:
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 3:25 PM -0800, "Gage Morgan via swift-users" <swift-users@swift.org> wrote:
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 3:20 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
On Dec 9, 2015, at 2:01 PM, Gage Morgan <gagemorgan@outlook.com> wrote:
So I don't have any files named libcairo2.so, while I did have libcairo.so23xxxxx (some numbers after .so). I tried "link: cairo," and it said it could not find the module at all.
Sent from Outlook Mobile
On Wed, Dec 9, 2015 at 1:58 PM -0800, "Max Howell" <max.howell@apple.com> wrote:
Look at the .so file, you put the name without the lib prefix and without the .so suffix.
> So if the name of the library is libcairo amd to imstall I had to type "sudo apt-get install libcairo2-dev, what would I put for "link:?"