LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-27-2017, 02:12 PM   #16
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930

So it works properly when you build within Debian Jesse?

And you are trying to run Stretch or Mint on your build machine and similarly get it to work?

Use a VM on your system to run Debian Jesse to do your builds and then have your build machine be whatever it needs to be.

This is similar to what NevemTeve is saying.

This is also very typical of a cross compilation situation, where you install tools, get them correct, and then never change them. You seem to be changing the tools, and you shouldn't because the target isn't changing. I do realize it is not technically "cross compilation", however, it is some form of tools revision issue, which is coupled with the libraries and files provided specifically by Debian Jesse.
 
1 members found this post helpful.
Old 10-27-2017, 02:16 PM   #17
josarlo84
LQ Newbie
 
Registered: Oct 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
@OP: I cannot follow you. If you want to use the program on computer X, then compile it from source on computer X. That's how things work in Unix (unlike Windows, for example.)
My motivation is to utilize resources. I have a new machine with quite a bit of power. I'd like to offload our build server because there are 8 people using it. A compile takes 40 minutes for one user using an optimized make configuration. When multiple users use the server, build time increases. I may be ignorant, but I figured this could be done because the hardware architecture is the same and I am using a variant of Debian.
 
Old 10-27-2017, 02:19 PM   #18
josarlo84
LQ Newbie
 
Registered: Oct 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
So it works properly when you build within Debian Jesse?

And you are trying to run Stretch or Mint on your build machine and similarly get it to work?

Use a VM on your system to run Debian Jesse to do your builds and then have your build machine be whatever it needs to be.

This is similar to what NevemTeve is saying.

This is also very typical of a cross compilation situation, where you install tools, get them correct, and then never change them. You seem to be changing the tools, and you shouldn't because the target isn't changing. I do realize it is not technically "cross compilation", however, it is some form of tools revision issue, which is coupled with the libraries and files provided specifically by Debian Jesse.
This is what I feared . I have wanted to avoid using a VM because I don't want to reserve system resources for functionality that I don't need. Do you know of a lightweight VM that will allow me to do a barebones configuration just for doing a build? I would like to make it as transparent as possible.
 
Old 10-27-2017, 03:12 PM   #19
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,869
Blog Entries: 1

Rep: Reputation: 1870Reputation: 1870Reputation: 1870Reputation: 1870Reputation: 1870Reputation: 1870Reputation: 1870Reputation: 1870Reputation: 1870Reputation: 1870Reputation: 1870
(Off: Slow? Well, that's how C++ is. It is by design. Read the C++ FQA for details.)

Last edited by NevemTeve; 10-27-2017 at 03:17 PM.
 
Old 10-29-2017, 12:05 AM   #20
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196
You seem to be conflicted about the reasons for trying to configure your own build machine, and should think that through more clearly before trying to put the build system together.

Quote:
Originally Posted by josarlo84 View Post
My motivation is to utilize resources. I have a new machine with quite a bit of power. I'd like to offload our build server because there are 8 people using it.
Quote:
Originally Posted by josarlo84 View Post
I have wanted to avoid using a VM because I don't want to reserve system resources for functionality that I don't need.
If you have anything that can be described as a new machine with quite a bit of power, then setting up a VM with a dedicated build environmet should be no drain on resources and almost trivial compared to the required effort and problems resulting from installing non-standard library versions on the host.

Clearly you do need those resources to build for another platform - no need to make it more difficult than it should be. Use the resources - that is what they are for!

Quote:
Originally Posted by NevemTeve View Post
@OP: I cannot follow you. If you want to use the program on computer X, then compile it from source on computer X. That's how things work in Unix (unlike Windows, for example.)
This is a very good point - a primary feature (characteristic) of the *nix environment, and Free software generally, is the ability to build on the target machine. Make full use of that!

And as has been said several times, use a VM - it solves almost all the problems easily.

Quote:
Originally Posted by rtmistler View Post
Use a VM on your system to run Debian Jesse to do your builds and then have your build machine be whatever it needs to be.

This is similar to what NevemTeve is saying.

This is also very typical of a cross compilation situation, where you install tools, get them correct, and then never change them.
Quote:
Originally Posted by josarlo84 View Post
Do you know of a lightweight VM that will allow me to do a barebones configuration just for doing a build? I would like to make it as transparent as possible.
Can you define "light weight", or do you have any specific requirements? Just install Virtual Box (or another VM), install the build target and give it a try! Don't complicate the process by trying to solve non-existent problems! If you hit some resource limit or problem, then you will have a problem with parameters to be solved!

Last edited by astrogeek; 10-29-2017 at 12:06 AM.
 
1 members found this post helpful.
Old 11-17-2017, 01:41 PM   #21
josarlo84
LQ Newbie
 
Registered: Oct 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
dcrhoot

Quote:
Originally Posted by astrogeek View Post
Can you define "light weight", or do you have any specific requirements? Just install Virtual Box (or another VM), install the build target and give it a try! Don't complicate the process by trying to solve non-existent problems! If you hit some resource limit or problem, then you will have a problem with parameters to be solved!
When I say light weight, I mean something that runs with minimal drain on system resources. Virtual Box is a great solution, however, it requires dedicated x number of processors and y GB of ram. Compiling code requires to startup the VM, wait for boot, and then execute the code. I would rather not develop in the virtual environment, so any compilation bugs would have to be resolved on the host machine, and then compilation restarted.

I found my solution: dchroot. I installed my target OS on a separate partition. On host, I mount the partition and bind mount other necessary locations (i.e. /proc, /dev, and src directories). I then execute dchroot, and run the compile. There is no need to run a VM with dedicated RAM and processors. It essentially created a development sandbox with the correct libraries installed in the right location. I can integrate this with emacs, and it doesn't feel like I am doing anything special. Compilation is fast and I don't have to utilize resources on the build machine.

I am a newbie, so any viewpoints that could make this solution even better are welcomed!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile binaries in GUEST for HOST machine? emon_lq Gentoo 11 12-29-2016 03:48 AM
program segfault occurs only on host machine dayalan_cse Programming 1 03-24-2016 01:13 AM
Iptables: route web traffic of virtual machine through local proxy of host machine lola.hipf Linux - Networking 1 10-26-2014 07:09 PM
need help to create another machine under vmware which host machine is gateway server iftikhar.tutul Linux - Server 5 01-31-2014 08:04 PM
How to configure the serial port of my virtual machine with host machine. akram Linux - Newbie 4 07-31-2009 10:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration