Getting Started - swift.org - Ubuntu 14.04 installation - dependencies - libicu-dev


(Fastmail) #1

We discovered the hard way most of the runtime deps that are minimally required for any debianish distro. These should probably be put on the website. I would open a PR but the website isn't open source (hint, hint).

https://github.com/swiftdocker/docker-swift/blob/master/Dockerfile#L12

Tom

···

Sent from my iPhone

On 5 Dec 2015, at 00:15, swift-users-request@swift.org wrote:

Send swift-users mailing list submissions to
   swift-users@swift.org

To subscribe or unsubscribe via the World Wide Web, visit
   https://lists.swift.org/mailman/listinfo/swift-users
or, via email, send a message with subject or body 'help' to
   swift-users-request@swift.org

You can reach the person managing the list at
   swift-users-owner@swift.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of swift-users digest..."

Today's Topics:

  1. Re: Getting Started - swift.org - Ubuntu 14.04 installation -
     dependencies - libicu-dev (Musser, Dale)
  2. Re: Ignore header file with module? (Harlan Haskins)

----------------------------------------------------------------------

Message: 1
Date: Sat, 5 Dec 2015 00:07:29 +0000
From: "Musser, Dale" <musserda@missouri.edu>
To: "swift-users@swift.org" <swift-users@swift.org>
Subject: Re: [swift-users] Getting Started - swift.org - Ubuntu 14.04
   installation - dependencies - libicu-dev
Message-ID: <B3EEFB07-3634-40E0-9403-21033D912A80@missouri.edu>
Content-Type: text/plain; charset="utf-8"

This must be a 14.04 thing, I didn’t have a problem with ICU on 15.10.

Very likely. And, as pointed out by Dmitri it is a matter of what comes installed as default on the system. A server instance is going to be pretty different than a client instance. And, what additional packages were installed over time can change the environment as well.

I just want it to be as easy as possible for people to get swift installed and working with as few hassles as possible (yeah, buy a Mac!). A straight forward list of dependencies and how to install them would make it a better experience. I am pushing students to use swift and plan to use it in an OO course in the spring and would like to point them to swift.org and have it give them what they need to get things installed and running (so I have a selfish motive). Most of my students will already have an Ubuntu instance that is pretty new and probably set up previously as a server for web app development and C programming. My instance is a lot like the one’s they have which means for me they will run into at least one dependency issue that swift.org doesn’t mention on the getting started page. So, I appreciate anything you do to make the getting started page a great place to get started :slight_smile:

BTW, swift being available open source is totally awesome! Many thanks to everyone who made this happen. I wish all my students had Macs, but in a CS program there is a lot of diversity of technology and a lot of opinions on platform of choice. Being able to get swift in everyone’s hands makes it possible for me to use it in a non-iosDev course (which we have) on a large scale (100+ students per semester).

Dale

--
Dale Musser, Ph.D.
Associate Teaching Professor
Computer Science Department
College of Engineering
University of Missouri
201 Engineering Building West (mail)
Columbia, MO 65211
573.864.4230 cell (voice/text)
musserda@missouri.edu<mailto:musserda@missouri.edu>
http://engineering.missouri.edu/cs/
https://www.facebook.com/mizzoucs
https://www.facebook.com/mizzouit

From: <mawadah@apple.com<mailto:mawadah@apple.com>> on behalf of Mish Awadah <mawadah@apple.com<mailto:mawadah@apple.com>>
Date: Friday, December 4, 2015 at 5:36 PM
To: Daniel Dunbar <daniel_dunbar@apple.com<mailto:daniel_dunbar@apple.com>>
Cc: Dale Musser <musserda@missouri.edu<mailto:musserda@missouri.edu>>, "swift-users@swift.org<mailto:swift-users@swift.org>" <swift-users@swift.org<mailto:swift-users@swift.org>>
Subject: Re: [swift-users] Getting Started - swift.org - Ubuntu 14.04 installation - dependencies - libicu-dev

This must be a 14.04 thing, I didn’t have a problem with ICU on 15.10.

- mish

On Dec 4, 2015, at 3:35 PM, Daniel Dunbar <daniel_dunbar@apple.com<mailto:daniel_dunbar@apple.com>> wrote:

Thanks Dale, this is a good suggestion we will look into it.

- Daniel

On Dec 4, 2015, at 3:24 PM, Musser, Dale <musserda@missouri.edu<mailto:musserda@missouri.edu>> wrote:

I installed Swift on Ubuntu 14.04 according to the instructions on https://swift.org/getting-started/ and ran into the following when running “swift”:

error while loading shared libraries: libicuuc.so.52: cannot open shared object file: No such file or directory

This was resolved by doing:

sudo apt-get install libicu-dev

I think it would be a good idea to add this (and any other dependencies and how to resolve them) on the getting started page on swift.org<http://swift.org/>.

Students (a good audience for open source swift) are likely to run into this problem and it would be good to make it as easy as possible for them to get swift up and running. The Ubuntu 14.04 was an instance I installed on Linode that had been set up as a web server and I did not as a matter of course have libicu-dev installed. And, googling libicuuc.so.52 or the error didn’t immediately get me to the package leading me to believe users make have to work to find how to resolve the missing library.

Dale

--
Dale Musser, Ph.D.
Associate Teaching Professor
Computer Science Department
College of Engineering
University of Missouri
201 Engineering Building West (mail)
Columbia, MO 65211
573.864.4230 cell (voice/text)
musserda@missouri.edu<mailto:musserda@missouri.edu>
http://engineering.missouri.edu/cs/
https://www.facebook.com/mizzoucs
https://www.facebook.com/mizzouit

Engineering Building North is called Old Student Health Center on the MU maps. Here is a link to the campus interactive map for the Old Student Health Center:
http://map.missouri.edu/index.html?bldg=37133

_______________________________________________
swift-users mailing list
swift-users@swift.org<mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org<mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151205/6eefdcb1/attachment-0001.html>

------------------------------

Message: 2
Date: Fri, 4 Dec 2015 19:15:03 -0500
From: Harlan Haskins <harlan@harlanhaskins.com>
To: Daniel Dunbar <daniel_dunbar@apple.com>
Cc: swift-users@swift.org
Subject: Re: [swift-users] Ignore header file with module?
Message-ID: <751190DA-A837-4BB6-AF1F-307D1AB4819B@harlanhaskins.com>
Content-Type: text/plain; charset="utf-8"

So what happens is flipper.h declares a struct called `flash`. When I use `swift build` to build that module, I get this error:

/Users/harlan/.flipper/include/flash/flash.h:29:3: error: redefinition of 'flash' as different kind of symbol
} flash;
^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ncurses.h:566:28: note: previous definition is here
extern NCURSES_EXPORT(int) flash (void); /* implemented */

Even though I have no need for `curses.h` at all.

On Dec 4, 2015, at 6:55 PM, Daniel Dunbar <daniel_dunbar@apple.com> wrote:

(+Jordan, who may have some good ideas)

This is going to be problematic, I am not sure yet how to deal with this.

Can you explain more about exactly how this ends up failing? Do you have code which imports both Darwin and flipper?

- Daniel

On Dec 4, 2015, at 3:49 PM, Harlan Haskins <harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com>> wrote:

+swift-users, again

Yes, the flash struct is necessary, and we can’t really rename it. :confused:

On Dec 4, 2015, at 6:27 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>> wrote:

I see now I misunderstood your question, I thought you just wanted to exclude a particular header that was in flipper that defined that struct, so that it wouldn't conflict.

Is the header that defines said struct in the flipper necessary for your client?

(FYI probably best to keep swift-users in the CC list if possible just so others can benefit from the info).

- Daniel

On Dec 4, 2015, at 3:16 PM, Harlan Haskins <harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com>> wrote:

Ah! I somehow missed that keyword in the docs.

However, it seems the path is /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/curses.h

If I intend this to be cross-platform, how can I exclude that file in a non-Mac specific way?

Also it doesn’t seem to be excluding anything — I still get the issue.

My file is currently

module CFlipper [system] {
   exclude header "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/curses.h"
   exclude header "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/search.h"
   umbrella "/Users/harlan/.flipper/include/"
   link "flipper"
   export *
}

On Dec 4, 2015, at 6:08 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>> wrote:

Try using:
exclude header "/path/to/header.h"
in the module definition.

- Daniel

On Dec 4, 2015, at 3:06 PM, Harlan Haskins <harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com>> wrote:

Hi all,

Is there a way to ignore a specific header file when declaring a C dependency? I’m working with a library that publicly declares `flash` as a struct, and that conflicts with `ncurses`’s definition of `flash`. His code makes no use of curses.h, and I won’t be using it either.

Is there any way I can specifically exclude `curses.h` from my modulemap file? It’s a very simple file.

module CFlipper [system] {
   umbrella "/usr/local/include/flipper/"
   link "flipper"
   export *
}

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151204/07e53f28/attachment.html>

------------------------------

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

End of swift-users Digest, Vol 1, Issue 21
******************************************


(Mish Awadah) #2

We’ve modified the website installation instructions to include this dependency.

Thanks!
- mish

···

On Dec 4, 2015, at 4:23 PM, Thomas Catterall <me@swizzlr.co> wrote:

We discovered the hard way most of the runtime deps that are minimally required for any debianish distro. These should probably be put on the website. I would open a PR but the website isn't open source (hint, hint).

https://github.com/swiftdocker/docker-swift/blob/master/Dockerfile#L12

Tom

Sent from my iPhone

On 5 Dec 2015, at 00:15, swift-users-request@swift.org <mailto:swift-users-request@swift.org> wrote:

Send swift-users mailing list submissions to
   swift-users@swift.org <mailto:swift-users@swift.org>

To subscribe or unsubscribe via the World Wide Web, visit
   https://lists.swift.org/mailman/listinfo/swift-users
or, via email, send a message with subject or body 'help' to
   swift-users-request@swift.org <mailto:swift-users-request@swift.org>

You can reach the person managing the list at
   swift-users-owner@swift.org <mailto:swift-users-owner@swift.org>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of swift-users digest..."

Today's Topics:

  1. Re: Getting Started - swift.org <http://swift.org/> - Ubuntu 14.04 installation -
     dependencies - libicu-dev (Musser, Dale)
  2. Re: Ignore header file with module? (Harlan Haskins)

----------------------------------------------------------------------

Message: 1
Date: Sat, 5 Dec 2015 00:07:29 +0000
From: "Musser, Dale" <musserda@missouri.edu <mailto:musserda@missouri.edu>>
To: "swift-users@swift.org <mailto:swift-users@swift.org>" <swift-users@swift.org <mailto:swift-users@swift.org>>
Subject: Re: [swift-users] Getting Started - swift.org <http://swift.org/> - Ubuntu 14.04
   installation - dependencies - libicu-dev
Message-ID: <B3EEFB07-3634-40E0-9403-21033D912A80@missouri.edu <mailto:B3EEFB07-3634-40E0-9403-21033D912A80@missouri.edu>>
Content-Type: text/plain; charset="utf-8"

This must be a 14.04 thing, I didn’t have a problem with ICU on 15.10.

Very likely. And, as pointed out by Dmitri it is a matter of what comes installed as default on the system. A server instance is going to be pretty different than a client instance. And, what additional packages were installed over time can change the environment as well.

I just want it to be as easy as possible for people to get swift installed and working with as few hassles as possible (yeah, buy a Mac!). A straight forward list of dependencies and how to install them would make it a better experience. I am pushing students to use swift and plan to use it in an OO course in the spring and would like to point them to swift.org <http://swift.org/> and have it give them what they need to get things installed and running (so I have a selfish motive). Most of my students will already have an Ubuntu instance that is pretty new and probably set up previously as a server for web app development and C programming. My instance is a lot like the one’s they have which means for me they will run into at least one dependency issue that swift.org <http://swift.org/> doesn’t mention on the getting started page. So, I appreciate anything you do to make the getting started page a great place to get started :slight_smile:

BTW, swift being available open source is totally awesome! Many thanks to everyone who made this happen. I wish all my students had Macs, but in a CS program there is a lot of diversity of technology and a lot of opinions on platform of choice. Being able to get swift in everyone’s hands makes it possible for me to use it in a non-iosDev course (which we have) on a large scale (100+ students per semester).

Dale

--
Dale Musser, Ph.D.
Associate Teaching Professor
Computer Science Department
College of Engineering
University of Missouri
201 Engineering Building West (mail)
Columbia, MO 65211
573.864.4230 cell (voice/text)
musserda@missouri.edu <mailto:musserda@missouri.edu><mailto:musserda@missouri.edu <mailto:musserda@missouri.edu>>
http://engineering.missouri.edu/cs/
https://www.facebook.com/mizzoucs
https://www.facebook.com/mizzouit

From: <mawadah@apple.com <mailto:mawadah@apple.com><mailto:mawadah@apple.com <mailto:mawadah@apple.com>>> on behalf of Mish Awadah <mawadah@apple.com <mailto:mawadah@apple.com><mailto:mawadah@apple.com <mailto:mawadah@apple.com>>>
Date: Friday, December 4, 2015 at 5:36 PM
To: Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com><mailto:daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>>>
Cc: Dale Musser <musserda@missouri.edu <mailto:musserda@missouri.edu><mailto:musserda@missouri.edu <mailto:musserda@missouri.edu>>>, "swift-users@swift.org <mailto:swift-users@swift.org><mailto:swift-users@swift.org <mailto:swift-users@swift.org>>" <swift-users@swift.org <mailto:swift-users@swift.org><mailto:swift-users@swift.org <mailto:swift-users@swift.org>>>
Subject: Re: [swift-users] Getting Started - swift.org <http://swift.org/> - Ubuntu 14.04 installation - dependencies - libicu-dev

This must be a 14.04 thing, I didn’t have a problem with ICU on 15.10.

- mish

On Dec 4, 2015, at 3:35 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com><mailto:daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>>> wrote:

Thanks Dale, this is a good suggestion we will look into it.

- Daniel

On Dec 4, 2015, at 3:24 PM, Musser, Dale <musserda@missouri.edu <mailto:musserda@missouri.edu><mailto:musserda@missouri.edu <mailto:musserda@missouri.edu>>> wrote:

I installed Swift on Ubuntu 14.04 according to the instructions on https://swift.org/getting-started/ and ran into the following when running “swift”:

error while loading shared libraries: libicuuc.so.52: cannot open shared object file: No such file or directory

This was resolved by doing:

sudo apt-get install libicu-dev

I think it would be a good idea to add this (and any other dependencies and how to resolve them) on the getting started page on swift.org <http://swift.org/><http://swift.org/>.

Students (a good audience for open source swift) are likely to run into this problem and it would be good to make it as easy as possible for them to get swift up and running. The Ubuntu 14.04 was an instance I installed on Linode that had been set up as a web server and I did not as a matter of course have libicu-dev installed. And, googling libicuuc.so.52 or the error didn’t immediately get me to the package leading me to believe users make have to work to find how to resolve the missing library.

Dale

--
Dale Musser, Ph.D.
Associate Teaching Professor
Computer Science Department
College of Engineering
University of Missouri
201 Engineering Building West (mail)
Columbia, MO 65211
573.864.4230 cell (voice/text)
musserda@missouri.edu <mailto:musserda@missouri.edu><mailto:musserda@missouri.edu <mailto:musserda@missouri.edu>>
http://engineering.missouri.edu/cs/
https://www.facebook.com/mizzoucs
https://www.facebook.com/mizzouit

Engineering Building North is called Old Student Health Center on the MU maps. Here is a link to the campus interactive map for the Old Student Health Center:
http://map.missouri.edu/index.html?bldg=37133 <http://map.missouri.edu/index.html?bldg=37133>

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org><mailto:swift-users@swift.org <mailto:swift-users@swift.org>>
https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org><mailto:swift-users@swift.org <mailto:swift-users@swift.org>>
https://lists.swift.org/mailman/listinfo/swift-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151205/6eefdcb1/attachment-0001.html>

------------------------------

Message: 2
Date: Fri, 4 Dec 2015 19:15:03 -0500
From: Harlan Haskins <harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com>>
To: Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>>
Cc: swift-users@swift.org <mailto:swift-users@swift.org>
Subject: Re: [swift-users] Ignore header file with module?
Message-ID: <751190DA-A837-4BB6-AF1F-307D1AB4819B@harlanhaskins.com <mailto:751190DA-A837-4BB6-AF1F-307D1AB4819B@harlanhaskins.com>>
Content-Type: text/plain; charset="utf-8"

So what happens is flipper.h declares a struct called `flash`. When I use `swift build` to build that module, I get this error:

/Users/harlan/.flipper/include/flash/flash.h:29:3: error: redefinition of 'flash' as different kind of symbol
} flash;
^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ncurses.h:566:28: note: previous definition is here
extern NCURSES_EXPORT(int) flash (void); /* implemented */

Even though I have no need for `curses.h` at all.

On Dec 4, 2015, at 6:55 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>> wrote:

(+Jordan, who may have some good ideas)

This is going to be problematic, I am not sure yet how to deal with this.

Can you explain more about exactly how this ends up failing? Do you have code which imports both Darwin and flipper?

- Daniel

On Dec 4, 2015, at 3:49 PM, Harlan Haskins <harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com> <mailto:harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com>>> wrote:

+swift-users, again

Yes, the flash struct is necessary, and we can’t really rename it. :confused:

On Dec 4, 2015, at 6:27 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com> <mailto:daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>>> wrote:

I see now I misunderstood your question, I thought you just wanted to exclude a particular header that was in flipper that defined that struct, so that it wouldn't conflict.

Is the header that defines said struct in the flipper necessary for your client?

(FYI probably best to keep swift-users in the CC list if possible just so others can benefit from the info).

- Daniel

On Dec 4, 2015, at 3:16 PM, Harlan Haskins <harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com> <mailto:harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com>>> wrote:

Ah! I somehow missed that keyword in the docs.

However, it seems the path is /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/curses.h

If I intend this to be cross-platform, how can I exclude that file in a non-Mac specific way?

Also it doesn’t seem to be excluding anything — I still get the issue.

My file is currently

module CFlipper [system] {
   exclude header "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/curses.h"
   exclude header "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/search.h"
   umbrella "/Users/harlan/.flipper/include/"
   link "flipper"
   export *
}

On Dec 4, 2015, at 6:08 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com> <mailto:daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>>> wrote:

Try using:
exclude header "/path/to/header.h"
in the module definition.

- Daniel

On Dec 4, 2015, at 3:06 PM, Harlan Haskins <harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com> <mailto:harlan@harlanhaskins.com <mailto:harlan@harlanhaskins.com>>> wrote:

Hi all,

Is there a way to ignore a specific header file when declaring a C dependency? I’m working with a library that publicly declares `flash` as a struct, and that conflicts with `ncurses`’s definition of `flash`. His code makes no use of curses.h, and I won’t be using it either.

Is there any way I can specifically exclude `curses.h` from my modulemap file? It’s a very simple file.

module CFlipper [system] {
   umbrella "/usr/local/include/flipper/"
   link "flipper"
   export *
}

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org> <mailto:swift-users@swift.org <mailto:swift-users@swift.org>>
https://lists.swift.org/mailman/listinfo/swift-users <https://lists.swift.org/mailman/listinfo/swift-users>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151204/07e53f28/attachment.html>

------------------------------

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users

End of swift-users Digest, Vol 1, Issue 21
******************************************

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users