DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th September 2016
Nureo Nureo is offline
Sam98
 
Join Date: May 2016
Posts: 24
Smile How to install a program from source code?

Hello!

I was wondering how can I install a program from source code (compile it, make a package, and then install it). I would like to install specifically the IceCat browser.

Can you help me?
Reply With Quote
  #2   (View Single Post)  
Old 8th September 2016
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by Nureo View Post
Can you help me?
There are many variables to consider:
  • Has a compatible compiler been ported to OpenBSD? The answer is likely yes, but this is not guaranteed. You may have to port an entire toolchain in order to have all the prerequisites to building your intended application.
  • Have all supporting libraries been ported to OpenBSD? The only way to determine the answer is by digging into the code. You may need to port necessary libraries before getting to the browser itself.
  • Has the code been written in an agnostic manner, or will Linux-centric code have to be re-written? Again, the only way to find out is by studying the code.
  • Details on packaging will require study of the following:

    http://www.openbsd.org/faq/ports/index.html
Applications targeting Linux will use its filesystem layout which is different than OpenBSD. For more information, see the hier(7) manpage. Code may need to rewritten to use OpenBSD's topology over another system's.

Given that you have previously stated that you have little to no experience with either compilation or programming, I will guess this project is far above your current skill set, but I may be wrong. Depending upon your motivation, you could learn through lots of hard work.

Porting complicated applications can be very time-consuming & a practice we don't formally provide support for on this site.. GIven your newness to the skill set needed to use the tools, you are asking for someone to do the work ahead of you in order to lead you to a working solution. In general, the volunteers here do not have the time to provide this level of support.

You do have options available.Good luck.

Last edited by ocicat; 9th September 2016 at 02:34 AM. Reason: add clarity
Reply With Quote
  #3   (View Single Post)  
Old 8th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

To add to Ocicat's comments...

To my knowledge, this is a rebranded fork of Firefox. Firefox is an extremely complicated application, with hundreds of dependencies on other applications.

You could start with the www/mozilla-firefox port, and adapt it to meet the requirements of the GNU fork. But ... since you are asking "how to compile" this is a task which I believe is well beyond your skills.

The OpenBSD FAQ includes a Porter's Handbook, but this assumes the reader has application development or application porting skills.
Reply With Quote
  #4   (View Single Post)  
Old 9th September 2016
Nureo Nureo is offline
Sam98
 
Join Date: May 2016
Posts: 24
Thumbs up

I didn't thought it would be such complex. Maybe it is because I am GNU user. In that system most users made this kind of compilations from source code at least once. We can have errors on that process, but is more "user friendly" I guess.

Thank you for your dedicated answer ocicat. Maybe I would take some of your advices.

jggimi, thank you also. You remember me that there is a script on IceCat, and I think it is used for make the "change" from Firefox into IceCat.

Maybe I can use it for try something.

Thank you all, again.
Reply With Quote
  #5   (View Single Post)  
Old 9th September 2016
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by Nureo View Post
In that system most users made this kind of compilations from source code at least once. We can have errors on that process, but is more "user friendly" I guess.
Underscoring jggimi's point, the build process for a GNU application targeting a GNU system will likely be simpler given that a number of expected dependencies will already be in place. Since OpenBSD is not the original target operating system for the application, low-level changes may be required. The responsibility for making these changes falls on whoever ports the application.
Reply With Quote
  #6   (View Single Post)  
Old 9th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

OpenBSD is not GNU. It never has been, and never will be.

---

While there are GNU-derived tools in OpenBSD, they are maintained in a separate branch of the source tree, with other tools that are considered, to quote from /usr/src/gnu/README (link):
Quote:
...Gigantic and Nasty but Unavoidable.
Examples of such tools are gcc(1) and awk(1).

And as an example of GNU tools that are not in the source tree, let's look at the make(1) command. There is a make(1) in OpenBSD that is used to compile applications from source code. It is BSD make. It is not GNU make. The two tools have the same name, but are quite different. GNU make is available for OpenBSD as a port/package, and installs as /usr/local/bin/gmake, and is used to build applications that require GNU make.

Last edited by jggimi; 9th September 2016 at 12:39 PM. Reason: clarity, GNU-derived tools in and out of OpenBSD
Reply With Quote
  #7   (View Single Post)  
Old 13th September 2016
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by jggimi View Post
Examples of such tools are gcc(1) and awk(1).
awk(1) is a BSD-licensed tool. Always has been.
http://cvsweb.openbsd.org/cgi-bin/cv...ype=text/plain
Reply With Quote
  #8   (View Single Post)  
Old 13th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Firefox is a massive application. I happened to rebuild a 6.0-stable/i386 package for firefox-esr, and noticed:
  • There were 147 third party build dependencies.
  • It took 3 minutes 45 seconds just to unpack the the source code tarball on solid state disk.
  • The unpacked tarball consumed a gigabyte of storage.
And, since 2012, the build has used clang rather than gcc on i386.
Reply With Quote
  #9   (View Single Post)  
Old 13th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Thanks for the correction. Perhaps I should have used cvs(1) as a better example.
Reply With Quote
Old 17th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I happened to be on my -stable build machine again today, so I inspected the unpacked source code in the firefox-esr tarball.

Number of files: 131,282
Number of lines: 42,230,228

I think that "massive" is an apt description.
Reply With Quote
Reply

Tags
compile, icecat, install, source code

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Other Open-source typeface “Hack” brings design to source code J65nko News 1 31st August 2015 03:06 PM
explore source code for installed program bsdnewbie999 OpenBSD General 1 23rd February 2009 06:13 AM
Trying to compile GLUT source code on freebsd. welkin Programming 0 11th January 2009 03:15 PM
Google released Android source code graudeejs Off-Topic 1 22nd October 2008 10:02 PM
Source code for ed? matt FreeBSD Ports and Packages 1 21st October 2008 08:18 PM


All times are GMT. The time now is 01:58 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick