Joshua Colp
2016-Nov-29 11:19 UTC
[asterisk-users] Any reason Asterisk won't start without a rebuild on a cloned VPS?
On Tue, Nov 29, 2016, at 07:15 AM, Barry Flanagan wrote:> On 29 November 2016 at 10:56, Jonathan H <lardconcepts at gmail.com> wrote: > > > Any ideas why a VPS, cloned from another instance (DigitalOcean > > "droplets" if it matters), won't run on the new instance? > > > > Everything else is the same; region, memory, disk, hypervisor version etc. > > > > You probably need to select "DONT_OPTIMIZE" in make menuselect under > "Compiler Flags". This is generally required for VPS or any situation > where > the binary might be used on a slightly different CPU.Close! The compiler flag to disable is BUILD_NATIVE. It instructs GCC to build optimized for the CPU, if the binary is moved to a CPU that differs - it may or may not work depending on how close they are. -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Barry Flanagan
2016-Nov-29 11:25 UTC
[asterisk-users] Any reason Asterisk won't start without a rebuild on a cloned VPS?
On 29 November 2016 at 11:19, Joshua Colp <jcolp at digium.com> wrote:> On Tue, Nov 29, 2016, at 07:15 AM, Barry Flanagan wrote: > > On 29 November 2016 at 10:56, Jonathan H <lardconcepts at gmail.com> wrote: > > > > > Any ideas why a VPS, cloned from another instance (DigitalOcean > > > "droplets" if it matters), won't run on the new instance? > > > > > > Everything else is the same; region, memory, disk, hypervisor version > etc. > > > > > > > You probably need to select "DONT_OPTIMIZE" in make menuselect under > > "Compiler Flags". This is generally required for VPS or any situation > > where > > the binary might be used on a slightly different CPU. > > Close! The compiler flag to disable is BUILD_NATIVE. It instructs GCC to > build optimized for the CPU, if the binary is moved to a CPU that > differs - it may or may not work depending on how close they are. > >Aya! That'll be the one :-) -Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161129/8f4eb21b/attachment.html>
Jonathan H
2016-Nov-29 11:42 UTC
[asterisk-users] Any reason Asterisk won't start without a rebuild on a cloned VPS?
Thanks for the super-quick answer! Now I was able to find this: https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk#BuildingandInstallingAsterisk-Buildingfornon-nativearchitectures I had just assumed a cloned vps would be identical. Out of interest, how unoptimized would the result be? I mean, on a low-end VPS with maybe 3 simultaneous calls at most and runs almost idle even then, is the difference going to be noticeable at all? Thanks again. On 29 November 2016 at 11:19, Joshua Colp <jcolp at digium.com> wrote:> > Close! The compiler flag to disable is BUILD_NATIVE. It instructs GCC to > build optimized for the CPU, if the binary is moved to a CPU that > differs - it may or may not work depending on how close they are. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161129/795d6253/attachment.html>
Joshua Colp
2016-Nov-29 11:49 UTC
[asterisk-users] Any reason Asterisk won't start without a rebuild on a cloned VPS?
On Tue, Nov 29, 2016, at 07:42 AM, Jonathan H wrote:> Thanks for the super-quick answer! Now I was able to find this: > https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk#BuildingandInstallingAsterisk-Buildingfornon-nativearchitectures > > I had just assumed a cloned vps would be identical.Pay no attention to the CPU behind the curtain :D> > Out of interest, how unoptimized would the result be? > > I mean, on a low-end VPS with maybe 3 simultaneous calls at most and runs > almost idle even then, is the difference going to be noticeable at all?Should be fine for that. -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Guido Falsi
2016-Nov-29 11:51 UTC
[asterisk-users] Any reason Asterisk won't start without a rebuild on a cloned VPS?
On 11/29/16 12:19, Joshua Colp wrote:> On Tue, Nov 29, 2016, at 07:15 AM, Barry Flanagan wrote: >> On 29 November 2016 at 10:56, Jonathan H <lardconcepts at gmail.com> wrote: >> >>> Any ideas why a VPS, cloned from another instance (DigitalOcean >>> "droplets" if it matters), won't run on the new instance? >>> >>> Everything else is the same; region, memory, disk, hypervisor version etc. >>> >> >> You probably need to select "DONT_OPTIMIZE" in make menuselect under >> "Compiler Flags". This is generally required for VPS or any situation >> where >> the binary might be used on a slightly different CPU. > > Close! The compiler flag to disable is BUILD_NATIVE. It instructs GCC to > build optimized for the CPU, if the binary is moved to a CPU that > differs - it may or may not work depending on how close they are. >BTW, I had to disable it by defualt in the FreeBSD port, otherwise the official binary packages would be broken on CPUs different from the ones used by the FreeBSD project build cluster. I think all linux distributions are/should do the same for default package builds. -- Guido Falsi <mad at madpilot.net>
Guido Falsi
2016-Nov-29 11:57 UTC
[asterisk-users] Any reason Asterisk won't start without a rebuild on a cloned VPS?
On 11/29/16 12:42, Jonathan H wrote:> Thanks for the super-quick answer! Now I was able to find this: > https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk#BuildingandInstallingAsterisk-Buildingfornon-nativearchitectures > > I had just assumed a cloned vps would be identical.In fact there are chances the CPU will not be the same even by stopping and then restarting the same VM. The Hypervisor could choose to start the same VM on different iron depending on it's load balancing settings and whim at the moment. -- Guido Falsi <mad at madpilot.net>