Hi Brice

Thank you for the quick response! That patch fixes the build issue and
hwloc works as expected (make check has 1 failure on 32bit, but that also
happens on master so I didn't worry about it).

Will this fix be in the next hwloc release? If so, do you know
(approximately) when the next release will happen?

Thank you!

Thomas Van Doren
thomas.vando...@gmail.com


On Wed, Nov 19, 2014 at 10:42 PM, Brice Goglin <brice.gog...@inria.fr>
wrote:

>  Hello,
> Thanks, I can reproduce the problem on Debian with -O3 -m32.
> The issue is that -O3 makes gcc inline more. We have function A call B
> multiple times, and B calls C which contains asm with a label. So in the
> end A contains the asm label from C multiple times.
> Google says we should use local labels to fix the confusion between
> duplicates.
> This patch should help.
> Brice
>
>
> --- a/include/private/cpuid-x86.h
> +++ b/include/private/cpuid-x86.h
> @@ -32,14 +32,14 @@ static __hwloc_inline int hwloc_have_x86_cpuid(void)
>        "pushfl   \n\t"                                           \
>        "pop %1   \n\t"                                           \
>        "cmp %1,%2\n\t"   /* Compare with expected value */       \
> -      "jnz Lhwloc1\n\t"   /* Unexpected, failure */               \
> +      "jnz 0f\n\t"   /* Unexpected, failure */               \
>
>        TRY_TOGGLE        /* Try to set/clear */
>        TRY_TOGGLE        /* Try to clear/set */
>
>        "mov $1,%0\n\t"   /* Passed the test! */
>
> -      "Lhwloc1: \n\t"
> +      "0: \n\t"
>        "popfl    \n\t"   /* Restore flags */
>
>        : "=r" (ret), "=&r" (tmp), "=&r" (tmp2));
>
>
>
>
>
> Le 20/11/2014 03:04, Thomas Van Doren a écrit :
>
>  Hi
>
>  I am getting the following error when building hwloc on 32bit ubuntu
> 14.10 (utopic) with optimizations (CFLAGS='-O3'):
>
>  ... snip ...
>    CC       topology-x86.lo
> /home/vagrant/src/hwloc/include/private/cpuid-x86.h: Assembler messages:
> /home/vagrant/src/hwloc/include/private/cpuid-x86.h:40: Error: symbol
> `Lhwloc1' is already defined
> Makefile:878: recipe for target 'topology-x86.lo' failed
> make[1]: *** [topology-x86.lo] Error 1
> make[1]: Leaving directory '/home/vagrant/src/hwloc/hwloc'
> Makefile:615: recipe for target 'all-recursive' failed
> make: *** [all-recursive] Error 1
>
>  I used these steps to verify that the build works without optimizations
> and reproduce the error above with optimizations:
>
>  git clone https://github.com/open-mpi/hwloc
> cd hwloc/
> ./autogen.sh
> ./configure
> make
> # This works, but no optimizations.
>
>  # This fails with the error above...
> git clean -dxf
> ./autogen.sh
> ./configure CFLAGS='-O3' CXXFLAGS='-O3'
> make
>
>  Is this expected to work? Do you have recommendations for fixing? I
> first saw this on hwloc 1.9.1 and verified it also happens on 1.10.0.
>
>  I attached the configure and make V=1 output, as well as the config.log
> for the build against master (sha: 77fbe8f) that fails.
>
>  I am using the utopic32 vagrant box from Ubuntu:
> http://cloud-images.ubuntu.com/vagrant/utopic/current/
>
>  Please let me know if you need any other information.
>
>  Thanks!
>
>  Thomas Van Doren
> thomas.vando...@gmail.com
>
>
> _______________________________________________
> hwloc-users mailing listhwloc-us...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
> Link to this post: 
> http://www.open-mpi.org/community/lists/hwloc-users/2014/11/1117.php
>
>
>
> _______________________________________________
> hwloc-users mailing list
> hwloc-us...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
> Link to this post:
> http://www.open-mpi.org/community/lists/hwloc-users/2014/11/1119.php
>

Reply via email to