Bug 740241 - cln fails to build on arm and probably sparc as well
Summary: cln fails to build on arm and probably sparc as well
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cln
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Deji Akingunola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-21 12:37 UTC by Henrik Nordström
Modified: 2011-10-22 08:28 UTC (History)
1 user (show)

Fixed In Version: cln-1.3.2-2.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-22 08:28:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Add -DNO_ASM on arm architectures as required in INSTALL (948 bytes, patch)
2011-09-21 12:37 UTC, Henrik Nordström
no flags Details | Diff

Description Henrik Nordström 2011-09-21 12:37:18 UTC
Created attachment 524189 [details]
Add -DNO_ASM on arm architectures as required in INSTALL

Description of problem:

The assembly code included in cln is incomplete on arm and other platforms, see INSTALL

Discovered while trying to port Fedora 15 to the new armv7hl secondary architecture. The armv5tel secondary arch also have the same problem on F14.

Version-Release number of selected component (if applicable):

1.3.1-1

How reproducible:

Always

Steps to Reproduce:
1. Try to build on arm platform
2.
3.
  
Actual results:

Build fails

Expected results:

rpms built

Additional info:

This is a known defect in cln documented in INSTALL. Attached patch adds the required -DNO_ASM flag.

Comment 1 Henrik Nordström 2011-10-17 19:11:53 UTC
Just noticed there is a new 1.3.2-1.fc15 build with this change. Now testing.

Link the bug to the update request perhaps?

Comment 2 Deji Akingunola 2011-10-18 14:46:30 UTC
Sorry for now linking the bug to the update earlier, will go ahead and do that.

Comment 3 Henrik Nordström 2011-10-18 21:05:33 UTC
1.3.2 fails on arm with new errors.

libtool: link: g++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -DNO_ASM -o .libs/pi pi.o  ../src/.libs/libcln.so -lgmp
../src/.libs/libcln.so: undefined reference to `_divu_32_rest'
../src/.libs/libcln.so: undefined reference to `_divu_16_rest'
../src/.libs/libcln.so: undefined reference to `_mulu32_high'

Comment 4 Henrik Nordström 2011-10-18 21:30:02 UTC
On a closer inspection it appears 1.3.2 did not pick up the -DNO_ASM on the files where it really matters (the assembly part).

1.3.1 build log:

/bin/sh ../libtool    --mode=compile gcc -DHAVE_CONFIG_H -I. -I../autoconf  -I../include -I../src -I../include -I../src -DNO_ASM  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16  -mfloat-abi=hard -Wa,--noexecstack -c -o cl_asm.lo `test -f 'base/digitseq/cl_asm.S' || echo './'`base/digitseq/cl_asm.S
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -DNO_ASM -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Wa,--noexecstack -c base/digitseq/cl_asm.S  -fPIC -DPIC -o .libs/cl_asm.o
/bin/sh ../libtool    --mode=compile gcc -DHAVE_CONFIG_H -I. -I../autoconf  -I../include -I../src -I../include -I../src -DNO_ASM  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16  -mfloat-abi=hard -Wa,--noexecstack -c -o cl_asm_GF2.lo `test -f 'polynomial/elem/cl_asm_GF2.S' || echo './'`polynomial/elem/cl_asm_GF2.S
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -DNO_ASM -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Wa,--noexecstack -c polynomial/elem/cl_asm_GF2.S  -fPIC -DPIC -o .libs/cl_asm_GF2.o

1.3.2 build log:

/bin/sh ../libtool    --mode=compile gcc -DHAVE_CONFIG_H -I. -I../autoconf  -I../include -I../src -I../include -I../src   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16  -mfloat-abi=hard -Wa,--noexecstack -c -o cl_asm.lo `test -f 'base/digitseq/cl_asm.S' || echo './'`base/digitseq/cl_asm.S
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Wa,--noexecstack -c base/digitseq/cl_asm.S  -fPIC -DPIC -o .libs/cl_asm.o
./base/digitseq/cl_asm_arm_.cc: Assembler messages:
./base/digitseq/cl_asm_arm_.cc:55: Warning: ignoring attempt to redefine built-in register 'a1'
./base/digitseq/cl_asm_arm_.cc:56: Warning: ignoring attempt to redefine built-in register 'a2'
./base/digitseq/cl_asm_arm_.cc:57: Warning: ignoring attempt to redefine built-in register 'a3'
./base/digitseq/cl_asm_arm_.cc:58: Warning: ignoring attempt to redefine built-in register 'a4'
./base/digitseq/cl_asm_arm_.cc:59: Warning: ignoring attempt to redefine built-in register 'v1'
./base/digitseq/cl_asm_arm_.cc:60: Warning: ignoring attempt to redefine built-in register 'v2'
./base/digitseq/cl_asm_arm_.cc:61: Warning: ignoring attempt to redefine built-in register 'v3'
./base/digitseq/cl_asm_arm_.cc:62: Warning: ignoring attempt to redefine built-in register 'v4'
./base/digitseq/cl_asm_arm_.cc:63: Warning: ignoring attempt to redefine built-in register 'v5'
./base/digitseq/cl_asm_arm_.cc:64: Warning: ignoring attempt to redefine built-in register 'v6'
./base/digitseq/cl_asm_arm_.cc:66: Warning: ignoring attempt to redefine built-in register 'sl'
./base/digitseq/cl_asm_arm_.cc:67: Warning: ignoring attempt to redefine built-in register 'fp'
./base/digitseq/cl_asm_arm_.cc:68: Warning: ignoring attempt to redefine built-in register 'ip'
./base/digitseq/cl_asm_arm_.cc:69: Warning: ignoring attempt to redefine built-in register 'sp'
./base/digitseq/cl_asm_arm_.cc:70: Warning: ignoring attempt to redefine built-in register 'lr'
./base/digitseq/cl_asm_arm_.cc:71: Warning: ignoring attempt to redefine built-in register 'pc'
./base/digitseq/cl_asm_arm_.cc:297: Warning: s suffix on comparison instruction is deprecated
./base/digitseq/cl_asm_arm_.cc:2965: Warning: s suffix on comparison instruction is deprecated
./base/digitseq/cl_asm_arm_.cc:2970: Warning: s suffix on comparison instruction is deprecated
/bin/mkdir -p polynomial/elem; cp polynomial/elem/cl_asm_GF2.cc polynomial/elem/cl_asm_GF2.S
/bin/sh ../libtool    --mode=compile gcc -DHAVE_CONFIG_H -I. -I../autoconf  -I../include -I../src -I../include -I../src   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16  -mfloat-abi=hard -Wa,--noexecstack -c -o cl_asm_GF2.lo `test -f 'polynomial/elem/cl_asm_GF2.S' || echo './'`polynomial/elem/cl_asm_GF2.S
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Wa,--noexecstack -c polynomial/elem/cl_asm_GF2.S  -fPIC -DPIC -o .libs/cl_asm_GF2.o


Note that there is no -DNO_ASM here.. it is on pretty much everything else however.

Comment 5 Henrik Nordström 2011-10-18 21:37:05 UTC
Looking at the 1.3.2 spec file I see that you did not merge my patch setting CPPFLAGS, and instead set CXXFLAGS. The two have quite different meaning and CXXFLAGS is not used for assembly source only c++.

Comment 6 Deji Akingunola 2011-10-20 03:40:12 UTC
(In reply to comment #5)
> Looking at the 1.3.2 spec file I see that you did not merge my patch setting
> CPPFLAGS, and instead set CXXFLAGS. The two have quite different meaning and
> CXXFLAGS is not used for assembly source only c++.

Please take a look at the build at http://koji.fedoraproject.org/koji/taskinfo?taskID=3445478, it should fix the issue in comment #4 and #5. I have no idea why the errors in comment #3 is happening and have no way to test arm builds.

Comment 7 Henrik Nordström 2011-10-20 08:59:17 UTC
Thanks. Giving it a spin.

The errors in comment #3 is the same as the others, seen because -DNO_ASM was not properly set.

arm is an official secondary arch and to test arm builds you can use:

  arm-koji --scrach dist-f14 package.src.rpm

unfortunately there is not yet f15 in arm-koji, but will be very soon.

Comment 8 Henrik Nordström 2011-10-20 18:35:24 UTC
Built fine.

Comment 9 Fedora Update System 2011-10-21 02:23:49 UTC
cln-1.3.2-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/FEDORA-2011-14153

Comment 10 Fedora Update System 2011-10-22 08:28:06 UTC
cln-1.3.2-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.