Hello Devendra,


On Wed, Jan 3, 2018 at 5:29 PM, Devendra Joshi
<devendra.joshi9...@gmail.com> wrote:
> Hi,
>
> I am using Haproxy 1.7-stable version and its working fine.
> now i am upgrading to 1.8-stable, but i am getting error.
>
> do i need to update some package for this or can work with existing config.
>
> OS : CentOS 6.7
>
>
> Note : I check Haproxy 1.8-stable on CentOS 7, its not showing any problem
> during installation but in CentOS 6.7 showing following Error.
>
>
>
>
>
>
> src/hathreads.o: In function `thread_want_sync':
> /softwares/haproxy-1.8.2/src/hathreads.c:75: undefined reference to
> `__atomic_or_fetch'
> src/hathreads.o: In function `thread_exit_sync':
> /softwares/haproxy-1.8.2/src/hathreads.c:142: undefined reference to
> `__atomic_and_fetch'
> src/hathreads.o: In function `thread_sync_barrier':
> /softwares/haproxy-1.8.2/src/hathreads.c:108: undefined reference to
> `__atomic_compare_exchange_n'
> /softwares/haproxy-1.8.2/src/hathreads.c:109: undefined reference to
> `__atomic_or_fetch'
> src/lb_map.o: In function `recalc_server_map':
> /softwares/haproxy-1.8.2/src/lb_map.c:116: undefined reference to
> `__atomic_add_fetch'
> /softwares/haproxy-1.8.2/src/lb_map.c:125: undefined reference to
> `__atomic_sub_fetch'
> src/compression.o: In function `deinit_comp_ctx':
> /softwares/haproxy-1.8.2/src/compression.c:199: undefined reference to
> `__atomic_sub_fetch'
> /softwares/haproxy-1.8.2/src/compression.c:199: undefined reference to
> `__atomic_sub_fetch'
> src/compression.o: In function `init_comp_ctx':
> /softwares/haproxy-1.8.2/src/compression.c:177: undefined reference to
> `__atomic_add_fetch'
> /softwares/haproxy-1.8.2/src/compression.c:177: undefined reference to
> `__atomic_add_fetch'
> /softwares/haproxy-1.8.2/src/compression.c:177: undefined reference to
> `__atomic_add_fetch'
> src/compression.o: In function `alloc_zlib':
> /softwares/haproxy-1.8.2/src/compression.c:469: undefined reference to
> `__atomic_add_fetch'
> src/compression.o: In function `free_zlib':
> /softwares/haproxy-1.8.2/src/compression.c:500: undefined reference to
> `__atomic_sub_fetch'
> src/time.o: In function `tv_update_date':
> /softwares/haproxy-1.8.2/src/time.c:228: undefined reference to
> `__atomic_compare_exchange_n'
> collect2: ld returned 1 exit status
> make: *** [haproxy] Error 1


To compile Haproxy 1.8 with threads, at least GCC 4.7 is needed.
CentOs 6 only ships GCC 4.4.7, therefor compilation fails.
You can disable thread support, by adding USE_THREAD= to the make
command (nothing comes after the equal sign):

make clean; make TARGET=linux2628 USE_OPENSSL=1 [...] USE_THREAD=


Regards,
Lukas

Reply via email to