RSS/Atom feed Twitter
Site is read-only, email is disabled

GNU++11 not allowed with Objective-C code

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

10 of 10 messages available
Toggle history

Please log in to manage your subscriptions.

GNU++11 not allowed with Objective-C code Partha Bagchi 07 Apr 16:41
  GNU++11 not allowed with Objective-C code Ell via gimp-developer-list 07 Apr 17:24
   GNU++11 not allowed with Objective-C code Partha Bagchi 07 Apr 19:43
    GNU++11 not allowed with Objective-C code Partha Bagchi 07 Apr 20:56
    GNU++11 not allowed with Objective-C code Ell via gimp-developer-list 07 Apr 21:03
     GNU++11 not allowed with Objective-C code Partha Bagchi 07 Apr 21:17
      GNU++11 not allowed with Objective-C code Partha Bagchi 07 Apr 21:35
       GNU++11 not allowed with Objective-C code Ell via gimp-developer-list 07 Apr 22:00
        GNU++11 not allowed with Objective-C code Ell via gimp-developer-list 08 Apr 11:07
         GNU++11 not allowed with Objective-C code Partha Bagchi 08 Apr 11:28
Partha Bagchi
2018-04-07 16:41:10 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

Ell my friend, it's me again. :)

We can't use gnu++11 with objective-c code.

CXX gimp-parallel.o

error: invalid argument '-std=gnu++11' not allowed with 'Objective-C'

make[3]: *** [gimp-parallel.o] Error 1

So, how do we fix this? Also, shouldn't we be using c++11 or c++14 to be generic?

Thanks,
Patha

Ell via gimp-developer-list
2018-04-07 17:24:57 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sat, 7 Apr 2018 12:41:10 -0400 Partha Bagchi wrote:

Ell my friend, it's me again. :)

We can't use gnu++11 with objective-c code.

CXX gimp-parallel.o

error: invalid argument '-std=gnu++11' not allowed with 'Objective-C'

make[3]: *** [gimp-parallel.o] Error 1

So, how do we fix this? Also, shouldn't we be using c++11 or c++14 to be generic?

The specific compiler flag is chosen by some configure magic, so it should generally be ok. A little googling shows that people are getting the same error with -std=c++11 too.

I'm not sure why clang tries to compile this as objective-c, though. Can you post the output of $ make V=1 ?

-- Ell

Partha Bagchi
2018-04-07 19:43:30 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sat, Apr 7, 2018 at 1:24 PM, Ell via gimp-developer-list < gimp-developer-list@gnome.org> wrote:

On Sat, 7 Apr 2018 12:41:10 -0400 Partha Bagchi wrote:

Ell my friend, it's me again. :)

We can't use gnu++11 with objective-c code.

CXX gimp-parallel.o

error: invalid argument '-std=gnu++11' not allowed with 'Objective-C'

make[3]: *** [gimp-parallel.o] Error 1

So, how do we fix this? Also, shouldn't we be using c++11 or c++14 to be generic?

The specific compiler flag is chosen by some configure magic, so it should generally be ok. A little googling shows that people are getting the same error with -std=c++11 too.

I'm not sure why clang tries to compile this as objective-c, though. Can you post the output of $ make V=1 ?

-- Ell

My apologies. I should have framed that as 2 different issues. One about

the compilation and the other that we should probably be using C++14 (or 11) instead of gnu++11.

In any case, the verbose mode may not be particularly helpful:

g++ -DHAVE_CONFIG_H -I. -I../.. -DGIMPDIR=\""GIMP"\" -DGIMP_APP_VERSION=\"2.10\" -DGIMP_USER_VERSION=\"2.10\" -DG_LOG_DOMAIN=\"Gimp-Core\" -I../.. -I../.. -I../../app -I../../app -I/Users/partha/local10.9/include/cairo -I/Users/partha/local10.9/include/pixman-1 -I/Users/partha/local10.9/include
-I/Users/partha/local10.9/include/freetype2 -I/Users/partha/local10.9/include
-I/Users/partha/local10.9/include/libpng16 -I/Users/partha/local10.9/include/harfbuzz -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/include
-I/Users/partha/local10.9/include/freetype2 -I/Users/partha/local10.9/include/harfbuzz -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/include/libpng16 -I/Users/partha/local10.9/include -D_REENTRANT -I/Users/partha/local10.9/include/json-glib-1.0 -I/Users/partha/local10.9/include/gio-unix-2.0/ -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/mcgimp-std/Contents/Resources/include/gegl-0.3 -I/Users/partha/local10.9/mcgimp-std/Contents/Resources/include/babl-0.1 -D_REENTRANT -I/Users/partha/local10.9/include/gdk-pixbuf-2.0 -I/Users/partha/local10.9/include/libpng16 -I/Users/partha/local10.9/include
-I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/include/libmypaint -I/Users/partha/local10.9/include/json-c -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/include
-I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/mcgimp-std/Contents/Resources/include "-xobjective-c" -I/Users/partha/local10.9/include -DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -std=c++14 -O3 -ffast-math -ftree-vectorize -mmacosx-version-min=10.9 -MT gimp-parallel.o -MD -MP -MF .deps/gimp-parallel.Tpo -c -o gimp-parallel.o gimp-parallel.cc
error: invalid argument '-std=c++14' not allowed with 'Objective-C' make: *** [gimp-parallel.o] Error 1

In there you can see "-xobjective-c" is being used to compile gimp-parallel.cc. Also, you're seeing -std=c++14 because I have CXXFLAGS defined that way.

Thanks,
Partha

Partha Bagchi
2018-04-07 20:56:58 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sat, Apr 7, 2018 at 3:43 PM, Partha Bagchi wrote:

On Sat, Apr 7, 2018 at 1:24 PM, Ell via gimp-developer-list < gimp-developer-list@gnome.org> wrote:

On Sat, 7 Apr 2018 12:41:10 -0400 Partha Bagchi wrote:

Ell my friend, it's me again. :)

We can't use gnu++11 with objective-c code.

CXX gimp-parallel.o

error: invalid argument '-std=gnu++11' not allowed with 'Objective-C'

make[3]: *** [gimp-parallel.o] Error 1

So, how do we fix this? Also, shouldn't we be using c++11 or c++14 to be generic?

The specific compiler flag is chosen by some configure magic, so it should generally be ok. A little googling shows that people are getting the same error with -std=c++11 too.

I'm not sure why clang tries to compile this as objective-c, though. Can you post the output of $ make V=1 ?

-- Ell

My apologies. I should have framed that as 2 different issues. One about

the compilation and the other that we should probably be using C++14 (or 11) instead of gnu++11.

In any case, the verbose mode may not be particularly helpful:

g++ -DHAVE_CONFIG_H -I. -I../.. -DGIMPDIR=\""GIMP"\" -DGIMP_APP_VERSION=\"2.10\" -DGIMP_USER_VERSION=\"2.10\" -DG_LOG_DOMAIN=\"Gimp-Core\" -I../.. -I../.. -I../../app -I../../app -I/Users/partha/local10.9/include/cairo -I/Users/partha/local10.9/include/pixman-1 -I/Users/partha/local10.9/include -I/Users/partha/local10.9/include/freetype2 -I/Users/partha/local10.9/include -I/Users/partha/local10.9/include/libpng16 -I/Users/partha/local10.9/include/harfbuzz -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/include -I/Users/partha/local10.9/include/freetype2 -I/Users/partha/local10.9/include/harfbuzz -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/include/libpng16 -I/Users/partha/local10.9/include -D_REENTRANT -I/Users/partha/local10.9/include/json-glib-1.0 -I/Users/partha/local10.9/include/gio-unix-2.0/ -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/ mcgimp-std/Contents/Resources/include/gegl-0.3 -I/Users/partha/local10.9/ mcgimp-std/Contents/Resources/include/babl-0.1 -D_REENTRANT -I/Users/partha/local10.9/include/gdk-pixbuf-2.0 -I/Users/partha/local10.9/include/libpng16 -I/Users/partha/local10.9/include -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/include/libmypaint -I/Users/partha/local10.9/include/json-c -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/include -I/Users/partha/local10.9/include/glib-2.0 -I/Users/partha/local10.9/lib/glib-2.0/include -I/Users/partha/local10.9/ mcgimp-std/Contents/Resources/include "-xobjective-c" -I/Users/partha/local10.9/include -DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -std=c++14 -O3 -ffast-math -ftree-vectorize -mmacosx-version-min=10.9 -MT gimp-parallel.o -MD -MP -MF .deps/gimp-parallel.Tpo -c -o gimp-parallel.o gimp-parallel.cc
error: invalid argument '-std=c++14' not allowed with 'Objective-C' make: *** [gimp-parallel.o] Error 1

In there you can see "-xobjective-c" is being used to compile gimp-parallel.cc. Also, you're seeing -std=c++14 because I have CXXFLAGS defined that way.

Thanks,
Partha

As a further test, I tried this:

c++ -std=c++14 -O3 -ffast-math -ftree-vectorize -mmacosx-version-min=10.9 -c gimp-parallel.cc -I. -I../.. `pkg-config --cflags glib-2.0` `pkg-config --cflags gegl-0.3` -I..

It compiles fine. Hope that's helpful.

Ell via gimp-developer-list
2018-04-07 21:03:56 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sat, 7 Apr 2018 15:43:30 -0400 Partha Bagchi wrote:

My apologies. I should have framed that as 2 different issues. One about
the compilation and the other that we should probably be using C++14 (or 11) instead of gnu++11.

The exact flag we use is not hard coded, it's determined by AX_CXX_COMPILE_STDCXX() during configure. We *could* ask it for a strictly standard-compliant mode, but we're not that concerned about it. We might want to use some GCC extension, based on some other configure test, or whatnot.

In any case, the verbose mode may not be particularly helpful:

[...]

In there you can see "-xobjective-c" is being used to compile gimp-parallel.cc. Also, you're seeing -std=c++14 because I have CXXFLAGS defined that way.

Thanks. So, we've been passing "-xobjective-c" unconditionally to all compiled files on Mac. Commit 06950be7f0 should fix that, only passing it when compiling C files.

--
Ell

Partha Bagchi
2018-04-07 21:17:23 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sat, Apr 7, 2018 at 5:03 PM, Ell wrote:

On Sat, 7 Apr 2018 15:43:30 -0400 Partha Bagchi wrote:

My apologies. I should have framed that as 2 different issues. One about
the compilation and the other that we should probably be using C++14 (or 11) instead of gnu++11.

The exact flag we use is not hard coded, it's determined by AX_CXX_COMPILE_STDCXX() during configure. We *could* ask it for a strictly standard-compliant mode, but we're not that concerned about it. We might want to use some GCC extension, based on some other configure test, or whatnot.

In any case, the verbose mode may not be particularly helpful:

[...]

In there you can see "-xobjective-c" is being used to compile gimp-parallel.cc. Also, you're seeing -std=c++14 because I have CXXFLAGS defined that way.

Thanks. So, we've been passing "-xobjective-c" unconditionally to all compiled files on Mac. Commit 06950be7f0 should fix that, only passing it when compiling C files.

--
Ell

I was about to post that!!

Anyway, I did a git pull and something went haywire. I don't know what! I even did make distclean. I am getting realms of text starting with:

Making all in tools

cd .. && /bin/sh
/Users/partha/projects/src/gimp/gitsource/std/gimp/missing automake-1.15 --gnu tools/Makefile
cd .. && /bin/sh ./config.status tools/Makefile depfiles config.status: creating tools/Makefile config.status: executing depfiles commands CCLD gimptool-2.0
gimptool.o:1:1: error: source file is not valid UTF-8

... ^
gimptool.o:1:2: error: source file is not valid UTF-8

... ^
gimptool.o:1:3: error: source file is not valid UTF-8

... ^
gimptool.o:1:4: error: source file is not valid UTF-8

... ^
gimptool.o:1:5: error: expected identifier or '('

... ^
gimptool.o:1:6: warning: null character ignored [-Wnull-character]

... ^
gimptool.o:1:7: warning: null character ignored [-Wnull-character]

...

???

Partha Bagchi
2018-04-07 21:35:20 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sat, Apr 7, 2018 at 5:17 PM, Partha Bagchi wrote:

On Sat, Apr 7, 2018 at 5:03 PM, Ell wrote:

On Sat, 7 Apr 2018 15:43:30 -0400 Partha Bagchi wrote:

My apologies. I should have framed that as 2 different issues. One about
the compilation and the other that we should probably be using C++14 (or 11) instead of gnu++11.

The exact flag we use is not hard coded, it's determined by AX_CXX_COMPILE_STDCXX() during configure. We *could* ask it for a strictly standard-compliant mode, but we're not that concerned about it. We might want to use some GCC extension, based on some other configure test, or whatnot.

In any case, the verbose mode may not be particularly helpful:

[...]

In there you can see "-xobjective-c" is being used to compile gimp-parallel.cc. Also, you're seeing -std=c++14 because I have CXXFLAGS defined that way.

Thanks. So, we've been passing "-xobjective-c" unconditionally to all compiled files on Mac. Commit 06950be7f0 should fix that, only passing it when compiling C files.

--
Ell

I was about to post that!!

Anyway, I did a git pull and something went haywire. I don't know what! I even did make distclean. I am getting realms of text starting with:

Making all in tools

cd .. && /bin/sh /Users/partha/projects/src/gimp/gitsource/std/gimp/missing automake-1.15 --gnu tools/Makefile
cd .. && /bin/sh ./config.status tools/Makefile depfiles config.status: creating tools/Makefile config.status: executing depfiles commands CCLD gimptool-2.0
gimptool.o:1:1: error: source file is not valid UTF-8 <
U+0000><
U+0004>...
^
gimptool.o:1:2: error: source file is not valid UTF-8 <
U+0000><
U+0004>...
^
gimptool.o:1:3: error: source file is not valid UTF-8 <
U+0000><
U+0004>...
^
gimptool.o:1:4: error: source file is not valid UTF-8 <
U+0000><
U+0004>...
^
gimptool.o:1:5: error: expected identifier or '(' <
U+0000><
U+0004>...
^
gimptool.o:1:6: warning: null character ignored [-Wnull-character] <
U+0000><
U+0004>...
^
gimptool.o:1:7: warning: null character ignored [-Wnull-character] <
U+0000><
U+0004>...

???

Confirmed. It's something you did!! :) :)

Anyway, reverted back to previous head and c++14 error is back but all the above is gone.

Ell via gimp-developer-list
2018-04-07 22:00:57 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sat, 7 Apr 2018 17:35:20 -0400 Partha Bagchi wrote:

Confirmed. It's something you did!! :) :)

Anyway, reverted back to previous head and c++14 error is back but all the above is gone.

Ha, of course it is :) The commit caused -xobjective-c to be passed during linking too, and this apparently causes the object file to be treated as a source file. We'll need to untangle this mess, but not today :)

--
Ell

Ell via gimp-developer-list
2018-04-08 11:07:16 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sat, 7 Apr 2018 18:00:57 -0400 Ell via gimp-developer-list wrote:

On Sat, 7 Apr 2018 17:35:20 -0400 Partha Bagchi wrote:

Confirmed. It's something you did!! :) :)

Anyway, reverted back to previous head and c++14 error is back but all the above is gone.

Ha, of course it is :) The commit caused -xobjective-c to be passed during linking too, and this apparently causes the object file to be treated as a source file. We'll need to untangle this mess, but not today :)

This should be fixed now, by commit 6ebc3f1b09. Hopefully, for real this time :)

--
Ell

Partha Bagchi
2018-04-08 11:28:24 UTC (about 6 years ago)

GNU++11 not allowed with Objective-C code

On Sun, Apr 8, 2018 at 7:07 AM, Ell via gimp-developer-list < gimp-developer-list@gnome.org> wrote:

On Sat, 7 Apr 2018 18:00:57 -0400 Ell via gimp-developer-list wrote:

On Sat, 7 Apr 2018 17:35:20 -0400 Partha Bagchi wrote:

Confirmed. It's something you did!! :) :)

Anyway, reverted back to previous head and c++14 error is back but all the above is gone.

Ha, of course it is :) The commit caused -xobjective-c to be passed during linking too, and this apparently causes the object file to be treated as a source file. We'll need to untangle this mess, but not today :)

This should be fixed now, by commit 6ebc3f1b09. Hopefully, for real this time :)

--
Ell

Ha! We'll see! :)

OK, ok, it's seems fixed now. Have a great Sunday. :)