Bug 1734927

Summary: aespipe: FTBFS in Fedora rawhide/f31
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: aespipeAssignee: Jiri Hladky <hladky.jiri>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: hladky.jiri
Target Milestone: ---Flags: releng: needinfo? (hladky.jiri)
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-08 18:00:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1700317, 1732841    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2019-07-31 16:59:05 UTC
aespipe failed to build from source in Fedora rawhide/f31

https://koji.fedoraproject.org/koji/taskinfo?taskID=36631940


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Please fix aespipe at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
aespipe will be orphaned. Before branching of Fedora 32,
aespipe will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://fedoraproject.org/wiki/Fails_to_build_from_source

Comment 1 Fedora Release Engineering 2019-07-31 16:59:13 UTC
Created attachment 1595349 [details]
build.log

Comment 2 Fedora Release Engineering 2019-07-31 16:59:15 UTC
Created attachment 1595350 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2019-07-31 16:59:18 UTC
Created attachment 1595351 [details]
state.log

Comment 4 Ben Cotton 2019-08-13 17:08:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 5 Ben Cotton 2019-08-13 18:42:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 6 Jiri Hladky 2019-08-14 11:29:41 UTC
I have found the root cause but I would like for help to resolve it. Build fails only with rpmbuild, due to the different LDFLAGS and CFLAGS.

With rpmbuild the linking fails for the functions defined in assembler. These functions will get underscore in front of their name:

$ objdump -d aes-amd64.o | grep aes_encrypt                
0000000000000000 <_aes_encrypt>:

Outside of rpmbuild (plain configure && make amd64) this does not happen:
$ objdump -d aes-amd64.o | grep -2 aes_encrypt
0000000000000000 <aes_encrypt>:

There is no undescore. 

Could you please point me to some documentation? Why is this happening and how can I fix that? 

This seems to be relevant but I still don't know what is the best option for the fix:
https://stackoverflow.com/questions/1034852/adding-leading-underscores-to-assembly-symbols-with-gcc-on-win32

Thanks!
Jirka

Comment 7 Jiri Hladky 2019-08-14 11:42:46 UTC
I can fix by adding the asm("_assembly_function_name") to the header files like this:

aes.h:extern void aes_set_key(aes_context *, const unsigned char [], const int, const int) asm ("_aes_set_key");
aes.h:extern void aes_encrypt(const aes_context *, const unsigned char [], unsigned char []) asm ("_aes_encrypt");
aes.h:extern void aes_decrypt(const aes_context *, const unsigned char [], unsigned char []) asm ("_aes_decrypt");
md5.h:extern void md5_transform_CPUbyteorder(u_int32_t *, u_int32_t const *) asm("_md5_transform_CPUbyteorder");
md5.h:extern void md5_transform_CPUbyteorder_2x(u_int32_t *, u_int32_t const *, u_int32_t const *) asm("_md5_transform_CPUbyteorder_2x");

but I'm not sure if this is the right approach. I would prefer changing the compiler flags instead. Any ideas?

Comment 8 Jiri Hladky 2019-08-15 01:58:09 UTC
I came up with this patch. I will consult it with the author of aespipe. 

$cat aespipe-v2.4e-underline.patch
diff -ru aespipe-v2.4e-orig/aes.h aespipe-v2.4e/aes.h
--- aespipe-v2.4e-orig/aes.h    2004-06-12 16:31:41.000000000 +0200
+++ aespipe-v2.4e/aes.h 2019-08-15 03:44:54.661201314 +0200
@@ -42,6 +42,13 @@
 #  include <sys/types.h>
 #endif
 
+#if defined(USE_UNDERLINE)
+#  define aes_set_key _aes_set_key
+#  define aes_encrypt _aes_encrypt
+#  define aes_decrypt _aes_decrypt
+#endif
+
+
 // CONFIGURATION OPTIONS (see also aes.c)
 //
 // Define AES_BLOCK_SIZE to set the cipher block size (16, 24 or 32) or
diff -ru aespipe-v2.4e-orig/md5.h aespipe-v2.4e/md5.h
--- aespipe-v2.4e-orig/md5.h    2010-04-11 12:12:11.000000000 +0200
+++ aespipe-v2.4e/md5.h 2019-08-15 03:44:54.672201317 +0200
@@ -7,6 +7,12 @@
 #  include <sys/types.h>
 #endif
 
+#if defined(USE_UNDERLINE)
+#  define md5_transform_CPUbyteorder _md5_transform_CPUbyteorder
+#  define md5_transform_CPUbyteorder_2x _md5_transform_CPUbyteorder_2x
+#endif
+
+
 #if defined(__linux__) && defined(__KERNEL__) && (defined(X86_ASM) || defined(AMD64_ASM))
  asmlinkage
 #endif

Comment 9 Fedora Release Engineering 2019-09-22 04:23:11 UTC
Dear Maintainer,

your package has not been built successfully in 31. Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. Following the latest policy for such packages [2], your package
can be orphaned if this bug remains in NEW state more than 8 weeks.

A week before the mass branching of Fedora 32 according to the schedule [3],
any packages which still have open FTBFS bugs from Fedora 31 will be retired.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedoraproject.org/wiki/Releases/32/Schedule

Comment 10 Fedora Release Engineering 2019-09-29 04:25:37 UTC
Dear Maintainer,

your package has not been built successfully in 31. Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. Following the latest policy for such packages [2], your package
can be orphaned if this bug remains in NEW state more than 8 weeks.

A week before the mass branching of Fedora 32 according to the schedule [3],
any packages which still have open FTBFS bugs from Fedora 31 will be retired.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedoraproject.org/wiki/Releases/32/Schedule

Comment 11 Fedora Release Engineering 2019-10-06 04:22:30 UTC
Dear Maintainer,

your package has not been built successfully in 31. Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. Following the latest policy for such packages [2], your package
can be orphaned if this bug remains in NEW state more than 8 weeks.

A week before the mass branching of Fedora 32 according to the schedule [3],
any packages which still have open FTBFS bugs from Fedora 31 will be retired.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedoraproject.org/wiki/Releases/32/Schedule

Comment 12 Fedora Release Engineering 2019-10-13 04:22:26 UTC
Dear Maintainer,

your package has not been built successfully in 31. Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. Following the latest policy for such packages [2], your package
can be orphaned if this bug remains in NEW state more than 8 weeks.

A week before the mass branching of Fedora 32 according to the schedule [3],
any packages which still have open FTBFS bugs from Fedora 31 will be retired.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedoraproject.org/wiki/Releases/32/Schedule

Comment 13 Fedora Release Engineering 2019-10-20 04:22:28 UTC
Dear Maintainer,

your package has not been built successfully in 31. Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. Following the latest policy for such packages [2], your package
will be orphaned if this bug remains in NEW state more than 8 weeks.

A week before the mass branching of Fedora 32 according to the schedule [3],
any packages not successfully rebuilt at least on 30 will be
retired regardless of the status of this bug.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedoraproject.org/wiki/Releases/32/Schedule

Comment 14 Fedora Release Engineering 2019-10-27 04:22:24 UTC
Dear Maintainer,

your package has not been built successfully in 31. Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. Following the latest policy for such packages [2], your package
will be orphaned if this bug remains in NEW state more than 8 weeks.

A week before the mass branching of Fedora 32 according to the schedule [3],
any packages not successfully rebuilt at least on 30 will be
retired regardless of the status of this bug.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedoraproject.org/wiki/Releases/32/Schedule

Comment 15 Fedora Release Engineering 2019-11-03 04:22:19 UTC
Dear Maintainer,

your package has not been built successfully in 31. Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. Following the latest policy for such packages [2], your package
will be orphaned if this bug remains in NEW state more than 8 weeks.

A week before the mass branching of Fedora 32 according to the schedule [3],
any packages not successfully rebuilt at least on 30 will be
retired regardless of the status of this bug.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedoraproject.org/wiki/Releases/32/Schedule

Comment 16 Miro HronĨok 2019-11-08 18:00:41 UTC
The following builds were made: aespipe-2.4e-4.fc31 aespipe-2.4e-5.fc31