LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-18-2022, 07:24 PM   #1
Barcoboy
Member
 
Registered: May 2010
Distribution: Slackware
Posts: 58

Rep: Reputation: Disabled
haproxy 2.5.3 compiles but fails to start


Greetings. I'm trying to upgrade haproxy from 2.2.9 to 2.5.3 via sbopkg on my Slackware64-15.0 machine. sbopkg is able to download, compile, and install the package successfully, but when I try to run /etc/rc.d/rc.haproxy, I get the following:

Code:
FATAL ERROR: invalid code detected -- cannot go further, please recompile!
The source code was miscompiled by the compiler, which usually indicates that
some of the CFLAGS needed to work around overzealous compiler optimizations
were overwritten at build time. Please do not force CFLAGS, and read Makefile
and INSTALL files to decide on the best way to pass your local build options.

Build options :
  TARGET  = linux-glibc
  CPU     = generic
  CC      = cc
  CFLAGS  = -O2 -fPIC
  OPTIONS = USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 USE_NS=1
  DEBUG   =
Wondering if anybody else has had any luck with getting the Slackbuild script to compile a working version?
 
Old 03-19-2022, 12:21 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,131

Rep: Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202
looks like haproxy has become picky about its build flags: just delete these two lines from the haproxy.SlackBuild and rebuild/reinstall it
Code:
--- ./haproxy.SlackBuild.orig   2022-03-17 18:41:57.132985000 +0100
+++ ./haproxy.SlackBuild        2022-03-19 18:15:03.313985000 +0100
@@ -93,8 +93,6 @@
 
 make \
     TARGET=$TARGET \
-    CFLAGS="$SLKCFLAGS" \
-    CXXFLAGS="$SLKCFLAGS" \
     USE_PCRE=1 \
     USE_OPENSSL=1 \
     USE_ZLIB=1 \
thanks for the report!
 
1 members found this post helpful.
Old 03-19-2022, 01:23 PM   #3
Barcoboy
Member
 
Registered: May 2010
Distribution: Slackware
Posts: 58

Original Poster
Rep: Reputation: Disabled
That indeed fixed it, many thanks! I had tried removing the -O2 optimization parameter, but I guess that wasn't enough. :-)
 
1 members found this post helpful.
  


Reply

Tags
haproxy, sbopkg, slackware64 15.0



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
Program compiles and runs on 12.0-32 compiles on 14.0-64 but won't run. stf92 Slackware 6 01-23-2014 06:43 AM
Program compiles, but .so link fails at runtime pocket_aces Linux - Software 1 11-08-2006 11:13 AM
Java, code compiles and supposedly runs fine in windows, but not linux exodist Programming 4 03-16-2004 12:47 PM
RedHat 9.0, Kernel 2.4.21, Linux-Wlan-Ng-0.2.1, Compiles and Runs. But Cant Connect. AndrewBalmos Linux - Wireless Networking 5 01-18-2004 06:18 PM
compiles fine but a make error bosewicht Linux - Newbie 3 01-04-2004 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:49 AM.

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