All of lore.kernel.org
 help / color / mirror / Atom feed
* unable to compile
@ 2013-11-03 20:22 Xing
  2013-11-03 22:13 ` Xing
  0 siblings, 1 reply; 4+ messages in thread
From: Xing @ 2013-11-03 20:22 UTC (permalink / raw)
  To: ceph-devel; +Cc: Xing, Sage Weil

Hi all,

I was able to compile and run vstart.sh yesterday. When I merged the ceph master branch into my local master branch, I am not able to compile now. This issue seems to be related with boost but I have installed the libboost1.46-dev package. Any suggestions? thanks,

===
the compiler complains the following code section.

// file layouts
struct ceph_file_layout g_default_file_layout = {
 .fl_stripe_unit = init_le32(1<<22),
 .fl_stripe_count = init_le32(1),
 .fl_object_size = init_le32(1<<22),
 .fl_cas_hash = init_le32(0),
 .fl_object_stripe_unit = init_le32(0),
 .fl_unused = init_le32(-1),
 .fl_pg_pool = init_le32(-1),
};

===make errors===
common/config.cc:61:2: error: expected primary-expression before '.' token
common/config.cc:61:20: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
common/config.cc:62:2: error: expected primary-expression before '.' token
common/config.cc:62:21: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
common/config.cc:63:2: error: expected primary-expression before '.' token
common/config.cc:63:20: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
common/config.cc:64:2: error: expected primary-expression before '.' token
common/config.cc:64:17: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
common/config.cc:65:2: error: expected primary-expression before '.' token
common/config.cc:65:27: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
common/config.cc:66:2: error: expected primary-expression before '.' token
common/config.cc:66:15: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
common/config.cc:67:2: error: expected primary-expression before '.' token
common/config.cc:67:16: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]

I am compiling ceph in a 64-bit ubuntu12-04 machine and gcc version is 4.6.3. 

===gcc version===
root@client:/mnt/ceph# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Thanks,
Xing





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unable to compile
  2013-11-03 20:22 unable to compile Xing
@ 2013-11-03 22:13 ` Xing
       [not found]   ` <CAB2gnbUmdbyVsQLF=RibhiiCKKAZsMY=aokM+Ke7JcwLOTPQRQ@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Xing @ 2013-11-03 22:13 UTC (permalink / raw)
  To: ceph-devel, noahwatkins; +Cc: Xing, Sage Weil

Hi all,

It looks like it is because g++ does not support designated initializer list (gcc supports it). 
http://stackoverflow.com/questions/18731707/why-does-c11-not-support-designated-initializer-list-as-c99

I am able to compile and run vstart.sh again after I reverted the following commit by Noah.
6efc2b54d5ce85fcb4b66237b051bcbb5072e6a3

Noah, do you have any feedback?

Thanks,
Xing

On Nov 3, 2013, at 1:22 PM, Xing <xinglin@cs.utah.edu> wrote:

> Hi all,
> 
> I was able to compile and run vstart.sh yesterday. When I merged the ceph master branch into my local master branch, I am not able to compile now. This issue seems to be related with boost but I have installed the libboost1.46-dev package. Any suggestions? thanks,
> 
> ===
> the compiler complains the following code section.
> 
> // file layouts
> struct ceph_file_layout g_default_file_layout = {
> .fl_stripe_unit = init_le32(1<<22),
> .fl_stripe_count = init_le32(1),
> .fl_object_size = init_le32(1<<22),
> .fl_cas_hash = init_le32(0),
> .fl_object_stripe_unit = init_le32(0),
> .fl_unused = init_le32(-1),
> .fl_pg_pool = init_le32(-1),
> };
> 
> ===make errors===
> common/config.cc:61:2: error: expected primary-expression before '.' token
> common/config.cc:61:20: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
> common/config.cc:62:2: error: expected primary-expression before '.' token
> common/config.cc:62:21: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
> common/config.cc:63:2: error: expected primary-expression before '.' token
> common/config.cc:63:20: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
> common/config.cc:64:2: error: expected primary-expression before '.' token
> common/config.cc:64:17: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
> common/config.cc:65:2: error: expected primary-expression before '.' token
> common/config.cc:65:27: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
> common/config.cc:66:2: error: expected primary-expression before '.' token
> common/config.cc:66:15: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
> common/config.cc:67:2: error: expected primary-expression before '.' token
> common/config.cc:67:16: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
> 
> I am compiling ceph in a 64-bit ubuntu12-04 machine and gcc version is 4.6.3. 
> 
> ===gcc version===
> root@client:/mnt/ceph# gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
> 
> Thanks,
> Xing
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unable to compile
       [not found]   ` <CAB2gnbUmdbyVsQLF=RibhiiCKKAZsMY=aokM+Ke7JcwLOTPQRQ@mail.gmail.com>
@ 2013-11-03 22:33     ` Xing Lin
  2013-11-04 14:34       ` Noah Watkins
  0 siblings, 1 reply; 4+ messages in thread
From: Xing Lin @ 2013-11-03 22:33 UTC (permalink / raw)
  To: Noah Watkins; +Cc: ceph-devel, Sage Weil

Thanks, Noah!

Xing

On 11/3/2013 3:17 PM, Noah Watkins wrote:
> Thanks for looking at this. Unless there is a good solution I think 
> reverting it is ok as breaking the compile on a few platflorms is not 
> ok. Ill be lookong at this tonight. 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: unable to compile
  2013-11-03 22:33     ` Xing Lin
@ 2013-11-04 14:34       ` Noah Watkins
  0 siblings, 0 replies; 4+ messages in thread
From: Noah Watkins @ 2013-11-04 14:34 UTC (permalink / raw)
  To: Xing Lin; +Cc: Noah Watkins, ceph-devel, Sage Weil

This pull request (https://github.com/ceph/ceph/pull/812) reverts the
patch that changed the struct initialization. That is C99 style, but
apparently it isn't common in compilers, and GNU has just added it as
an extension.

I don't have a better solution at the moment, but as Greg mentioned,
perhaps detecting C++11 is an option, but that means a big nasty
ifdef. Another solution might be to just put the struct initialization
in a C file.

On Sun, Nov 3, 2013 at 2:33 PM, Xing Lin <xinglin@cs.utah.edu> wrote:
> Thanks, Noah!
>
> Xing
>
> On 11/3/2013 3:17 PM, Noah Watkins wrote:
>>
>> Thanks for looking at this. Unless there is a good solution I think
>> reverting it is ok as breaking the compile on a few platflorms is not ok.
>> Ill be lookong at this tonight.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-04 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-03 20:22 unable to compile Xing
2013-11-03 22:13 ` Xing
     [not found]   ` <CAB2gnbUmdbyVsQLF=RibhiiCKKAZsMY=aokM+Ke7JcwLOTPQRQ@mail.gmail.com>
2013-11-03 22:33     ` Xing Lin
2013-11-04 14:34       ` Noah Watkins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.