What are the limits of using OS X when it comes to compiling and running CLI-based tools and scripts that were written with Linux in mind?

I run little scientific scripts and C tools on OS X from time to time. For the C tools, I just download the source and compile using the provided Makefile. I usually don’t have any problems when using the tools.

However, knowing that those tools were written on Linux most of the time, I wonder if the differences in architecture (Linux is System V based, OS X is BSD based) will present issues.

3

Most of the time you should be fairly safe.

OS-X is based on BSD which, like Linux, is a variant of Unix, albeit one of the more different versions.

It does however have very similar kernel and OS calls, and is considered to be Posix compliant, which is the main thing needed for cross platform operation.

The biggest issue your going to face when it comes to Apple’s variation on things are

  • CPU & Processor architecture.
  • Additions made to the OS kernel but not released back into the wild.

Taking each of these in turn:

CPU & Processor architecture

All apple machines manufactured since 2007 have Intel based CPU’s in them, however older apple machines used a variety of different CPU types ranging from the Motorola 68000 right through to the IBM PowerPC.

Some Linux projects do have in-line assembly language in them, especially things that are designed to interface to the kernel at a very low level.

On a modern day Apple with an Intel, this is not really too much of an issue, but if your trying to compile for something with a non Intel CPU in, your going to have problems.

Thankfully however, because of Linux’s philosophy and open-source nature, this kind of practice is frowned upon, and very rarely seen in regular applications and tools.

Also, where an application is known to have platform specific parts in, there is often a ./configure script to run that ‘configures’ the sources for the platform being built on, or there is some way of specifying what the build target should be.

Additions made to the OS kernel but not released back into the wild

Apple are well known for putting thier own spin on things, and while I’m not an Apple developer (so I can’t say for 100% what is and is not added), I do know a lot of other developers who are.

Going on the various comments and things I’ve been told by others, there are a number of OS facilities that are only available in Apples variation of the Linux base OS, and in some cases, developers are encouraged to use these in place of regular calls.

This really however, should only affect the porting of applications going the other way, in so much that, the target platform is tied to being apple and not easily portable to other variants.

Bringing in external apps should not be much of an issue as long as the application uses only standard posix based API calls, and does not try to do anything special or clever, or make any assumptions about the environment in which it is running.

The area where your likely to have the most trouble, is in the GUI space. Beacuse the GUI is so closely tied to the windowing library, and the windowing library is where most of Apples 3rd party extensions lie, then IMHO if any type of application is going to present you with a whole heap of problems, it’s going to be here.

Most of the generic Linux stuff is designed to run under either a Generic X server, or using a toolkit such as Gnome or Kde, both of which (Correct me if I’m wrong here) I’m let to believe are not available on OS-X.

7

Instead of compiling from scratch have you investigated Homebrew MacPorts and Fink.All of these port unix tools to OSX with the heavy lifting already done for you. they also provide porting guides to enable you to port your own applications.

Each of these systems has its own adherents but to be honest they are much of a muchness, each has strengths and weaknesses and none is perfect.

http://www.finkproject.org/index.php?phpLang=en

http://brew.sh

http://www.macports.org

There are other similar projects but I haven’t tried those yet.
i am currently using Macports but all seem to work just fine.

There are sometimes minor annoyances in porting code from Linux to OS X. For example, until Lion, OS X didn’t provide a ‘getline()’ function, so you were forced to provide your own. Then when Apple added it in Lion, you had to have conditional compilation to include the home grown getline() when building on Snow Leopard, and leave it out when building on newer versions of OS X. It isn’t rocket science but it is surely annoying. Aside from nits like that, the UNIX API provided by OS X is pretty compatible with Linux.

The biggest headache now is that Apple has moved on to Clang for it’s compilers. Most Linux projects are still built with GNU GCC and a lot of code that will compile with the GNU GCC compilers will not compile using the Clang compilers. For example the Boost libraries seem to get broken and then patched with each new version of Clang or Boost. You may have to install a copy of the GNU GCC compilers from MacPorts or Homebrew to get stuff to compile.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

What are the limits of using OS X when it comes to compiling and running CLI-based tools and scripts that were written with Linux in mind?

I run little scientific scripts and C tools on OS X from time to time. For the C tools, I just download the source and compile using the provided Makefile. I usually don’t have any problems when using the tools.

However, knowing that those tools were written on Linux most of the time, I wonder if the differences in architecture (Linux is System V based, OS X is BSD based) will present issues.

3

Most of the time you should be fairly safe.

OS-X is based on BSD which, like Linux, is a variant of Unix, albeit one of the more different versions.

It does however have very similar kernel and OS calls, and is considered to be Posix compliant, which is the main thing needed for cross platform operation.

The biggest issue your going to face when it comes to Apple’s variation on things are

  • CPU & Processor architecture.
  • Additions made to the OS kernel but not released back into the wild.

Taking each of these in turn:

CPU & Processor architecture

All apple machines manufactured since 2007 have Intel based CPU’s in them, however older apple machines used a variety of different CPU types ranging from the Motorola 68000 right through to the IBM PowerPC.

Some Linux projects do have in-line assembly language in them, especially things that are designed to interface to the kernel at a very low level.

On a modern day Apple with an Intel, this is not really too much of an issue, but if your trying to compile for something with a non Intel CPU in, your going to have problems.

Thankfully however, because of Linux’s philosophy and open-source nature, this kind of practice is frowned upon, and very rarely seen in regular applications and tools.

Also, where an application is known to have platform specific parts in, there is often a ./configure script to run that ‘configures’ the sources for the platform being built on, or there is some way of specifying what the build target should be.

Additions made to the OS kernel but not released back into the wild

Apple are well known for putting thier own spin on things, and while I’m not an Apple developer (so I can’t say for 100% what is and is not added), I do know a lot of other developers who are.

Going on the various comments and things I’ve been told by others, there are a number of OS facilities that are only available in Apples variation of the Linux base OS, and in some cases, developers are encouraged to use these in place of regular calls.

This really however, should only affect the porting of applications going the other way, in so much that, the target platform is tied to being apple and not easily portable to other variants.

Bringing in external apps should not be much of an issue as long as the application uses only standard posix based API calls, and does not try to do anything special or clever, or make any assumptions about the environment in which it is running.

The area where your likely to have the most trouble, is in the GUI space. Beacuse the GUI is so closely tied to the windowing library, and the windowing library is where most of Apples 3rd party extensions lie, then IMHO if any type of application is going to present you with a whole heap of problems, it’s going to be here.

Most of the generic Linux stuff is designed to run under either a Generic X server, or using a toolkit such as Gnome or Kde, both of which (Correct me if I’m wrong here) I’m let to believe are not available on OS-X.

7

Instead of compiling from scratch have you investigated Homebrew MacPorts and Fink.All of these port unix tools to OSX with the heavy lifting already done for you. they also provide porting guides to enable you to port your own applications.

Each of these systems has its own adherents but to be honest they are much of a muchness, each has strengths and weaknesses and none is perfect.

http://www.finkproject.org/index.php?phpLang=en

http://brew.sh

http://www.macports.org

There are other similar projects but I haven’t tried those yet.
i am currently using Macports but all seem to work just fine.

There are sometimes minor annoyances in porting code from Linux to OS X. For example, until Lion, OS X didn’t provide a ‘getline()’ function, so you were forced to provide your own. Then when Apple added it in Lion, you had to have conditional compilation to include the home grown getline() when building on Snow Leopard, and leave it out when building on newer versions of OS X. It isn’t rocket science but it is surely annoying. Aside from nits like that, the UNIX API provided by OS X is pretty compatible with Linux.

The biggest headache now is that Apple has moved on to Clang for it’s compilers. Most Linux projects are still built with GNU GCC and a lot of code that will compile with the GNU GCC compilers will not compile using the Clang compilers. For example the Boost libraries seem to get broken and then patched with each new version of Clang or Boost. You may have to install a copy of the GNU GCC compilers from MacPorts or Homebrew to get stuff to compile.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

What are the limits of using OS X when it comes to compiling and running CLI-based tools and scripts that were written with Linux in mind?

I run little scientific scripts and C tools on OS X from time to time. For the C tools, I just download the source and compile using the provided Makefile. I usually don’t have any problems when using the tools.

However, knowing that those tools were written on Linux most of the time, I wonder if the differences in architecture (Linux is System V based, OS X is BSD based) will present issues.

3

Most of the time you should be fairly safe.

OS-X is based on BSD which, like Linux, is a variant of Unix, albeit one of the more different versions.

It does however have very similar kernel and OS calls, and is considered to be Posix compliant, which is the main thing needed for cross platform operation.

The biggest issue your going to face when it comes to Apple’s variation on things are

  • CPU & Processor architecture.
  • Additions made to the OS kernel but not released back into the wild.

Taking each of these in turn:

CPU & Processor architecture

All apple machines manufactured since 2007 have Intel based CPU’s in them, however older apple machines used a variety of different CPU types ranging from the Motorola 68000 right through to the IBM PowerPC.

Some Linux projects do have in-line assembly language in them, especially things that are designed to interface to the kernel at a very low level.

On a modern day Apple with an Intel, this is not really too much of an issue, but if your trying to compile for something with a non Intel CPU in, your going to have problems.

Thankfully however, because of Linux’s philosophy and open-source nature, this kind of practice is frowned upon, and very rarely seen in regular applications and tools.

Also, where an application is known to have platform specific parts in, there is often a ./configure script to run that ‘configures’ the sources for the platform being built on, or there is some way of specifying what the build target should be.

Additions made to the OS kernel but not released back into the wild

Apple are well known for putting thier own spin on things, and while I’m not an Apple developer (so I can’t say for 100% what is and is not added), I do know a lot of other developers who are.

Going on the various comments and things I’ve been told by others, there are a number of OS facilities that are only available in Apples variation of the Linux base OS, and in some cases, developers are encouraged to use these in place of regular calls.

This really however, should only affect the porting of applications going the other way, in so much that, the target platform is tied to being apple and not easily portable to other variants.

Bringing in external apps should not be much of an issue as long as the application uses only standard posix based API calls, and does not try to do anything special or clever, or make any assumptions about the environment in which it is running.

The area where your likely to have the most trouble, is in the GUI space. Beacuse the GUI is so closely tied to the windowing library, and the windowing library is where most of Apples 3rd party extensions lie, then IMHO if any type of application is going to present you with a whole heap of problems, it’s going to be here.

Most of the generic Linux stuff is designed to run under either a Generic X server, or using a toolkit such as Gnome or Kde, both of which (Correct me if I’m wrong here) I’m let to believe are not available on OS-X.

7

Instead of compiling from scratch have you investigated Homebrew MacPorts and Fink.All of these port unix tools to OSX with the heavy lifting already done for you. they also provide porting guides to enable you to port your own applications.

Each of these systems has its own adherents but to be honest they are much of a muchness, each has strengths and weaknesses and none is perfect.

http://www.finkproject.org/index.php?phpLang=en

http://brew.sh

http://www.macports.org

There are other similar projects but I haven’t tried those yet.
i am currently using Macports but all seem to work just fine.

There are sometimes minor annoyances in porting code from Linux to OS X. For example, until Lion, OS X didn’t provide a ‘getline()’ function, so you were forced to provide your own. Then when Apple added it in Lion, you had to have conditional compilation to include the home grown getline() when building on Snow Leopard, and leave it out when building on newer versions of OS X. It isn’t rocket science but it is surely annoying. Aside from nits like that, the UNIX API provided by OS X is pretty compatible with Linux.

The biggest headache now is that Apple has moved on to Clang for it’s compilers. Most Linux projects are still built with GNU GCC and a lot of code that will compile with the GNU GCC compilers will not compile using the Clang compilers. For example the Boost libraries seem to get broken and then patched with each new version of Clang or Boost. You may have to install a copy of the GNU GCC compilers from MacPorts or Homebrew to get stuff to compile.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật