Compilation on Solaris

16 views
Skip to first unread message

Igor Korot

unread,
Nov 8, 2020, 10:23:54 PM11/8/20
to wx-dev
Hi,
I am attempting to build my software on Oracle Solaris 11.4 with the latest
Oracle Studio (12.6).

I used following::

CFLAGS="-m64" CXXFLAGS="-m64 -std=c++11" LDFLAGS="-m64" ../configure
--enable-debug --with-gtk=3

The library built fine, and wxrc was also built and linked fine after
adding "-std=c++11" to the linking command.

Then I tried to build a minimal sample.
I again had to add "-std=c++11" to the linker command in order to fix the STL
link errors.

However there are still errors for the jpeg symbols:

[code]
igor@solaris:~/wxWidgets/buildSol/samples/minimal$ CC -o minimal
minimal_minimal.o -std=c++11
-L/export/home/igor/wxWidgets/buildSol/lib
-R/export/home/igor/wxWidgets/buildSol/lib -m64 -mt -m64
-lwx_gtk3u_core-3.1 -lwx_baseu-3.1 -lgtk-3 -lgdk-3
-lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo
-lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0
-lX11 -lXxf86vm -lSM -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0
-latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0
-lgobject-2.0 -lglib-2.0 -lnotify -lgdk_pixbuf-2.0 -lgio-2.0
-lgobject-2.0 -lglib-2.0 -lXtst -lpangoft2-1.0 -lpango-1.0
-lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lpng -lz -ljpeg
-ltiff -llzma -lwxregexu-3.1 -mt -m64 -lz -lsecret-1 -lgio-2.0
-lgobject-2.0 -lglib-2.0 -llzma -lm -lz -lsecret-1 -lgio-2.0
-lgobject-2.0 -lglib-2.0 -llzma -lm
Undefined first referenced
symbol in file
jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned long)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_resync_to_restart(jpeg_decompress_struct*, int)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_start_compress(jpeg_compress_struct*, int)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_CreateCompress(jpeg_compress_struct*, int, unsigned long)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_read_scanlines(jpeg_decompress_struct*, unsigned char**, unsigned
int) /export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_read_header(jpeg_decompress_struct*, int)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_std_error(jpeg_error_mgr*)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_set_quality(jpeg_compress_struct*, int, int)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_finish_decompress(jpeg_decompress_struct*)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_destroy_decompress(jpeg_decompress_struct*)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_set_defaults(jpeg_compress_struct*)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_write_scanlines(jpeg_compress_struct*, unsigned char**, unsigned
int) /export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_finish_compress(jpeg_compress_struct*)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_start_decompress(jpeg_decompress_struct*)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
jpeg_destroy_compress(jpeg_compress_struct*)
/export/home/igor/wxWidgets/buildSol/lib/libwx_gtk3u_core-3.1.so
ld: fatal: symbol referencing errors
[/code]

So, now 2 things:
1 Oracle Developer Studio Linker does require "-std=c++11", if it appears on
the compilation line. I hope it can be added to all samples Makefile and wxrc.

2. How do I fix those errors above? Should I add the jpeg library to
the linker command?

Thank you.

Igor Korot

unread,
Nov 8, 2020, 10:36:13 PM11/8/20
to wx-dev
Sorry forgot to mention it:

Using wxWidgets-3,1,4.

Thank you.

Paul Cornett

unread,
Nov 8, 2020, 11:54:44 PM11/8/20
to wx-...@googlegroups.com
Igor Korot wrote:
> jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned long)

The parameter types give you a clue: these symbols are C++ decorated
names, but the jpeg library is C. There is a C/C++ mismatch somewhere.
Are you using the builtin libjpeg?

Igor Korot

unread,
Nov 9, 2020, 12:39:04 AM11/9/20
to wx-dev
Paul,

Whatever the default is...

Is there something in config.log that will indicate it?

Thank you.


--
To unsubscribe, send email to wx-dev+un...@googlegroups.com
or visit http://groups.google.com/group/wx-dev

---
You received this message because you are subscribed to the Google Groups "wx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-dev/20201108205439.03d957cf%40gmail.com.

Igor Korot

unread,
Nov 9, 2020, 1:58:05 AM11/9/20
to wx-dev
Paul,

On Sun, Nov 8, 2020 at 11:38 PM Igor Korot <ikor...@gmail.com> wrote:
>
> Paul,
>
> On Sun, Nov 8, 2020, 10:54 PM Paul Cornett <paul...@gmail.com> wrote:
>>
>> Igor Korot wrote:
>> > jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned long)
>>
>> The parameter types give you a clue: these symbols are C++ decorated
>> names, but the jpeg library is C. There is a C/C++ mismatch somewhere.
>> Are you using the builtin libjpeg?
>
>
> Whatever the default is...
>
> Is there something in config.log that will indicate it?

Also, I just checked - I believe I'm using the OS library.
There is no libjpeg inside the build directory.

Thank you.

Paul Cornett

unread,
Nov 9, 2020, 2:33:25 AM11/9/20
to wx-...@googlegroups.com
Seems likely that the "jpeglib.h" that is being included does not have
an 'extern "C"' wrapper in it.

Igor Korot

unread,
Nov 9, 2020, 3:04:02 AM11/9/20
to wx-dev
Paul,

On Mon, Nov 9, 2020 at 1:33 AM Paul Cornett <paul...@gmail.com> wrote:
>
> Seems likely that the "jpeglib.h" that is being included does not have
> an 'extern "C"' wrapper in it.

I personally don't need jpeg support, so I will probably recompile wx
without it.

Thank you.

>
> --
> To unsubscribe, send email to wx-dev+un...@googlegroups.com
> or visit http://groups.google.com/group/wx-dev
>
> ---
> You received this message because you are subscribed to the Google Groups "wx-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/wx-dev/20201108233321.28c70ef7%40gmail.com.

Igor Korot

unread,
Nov 9, 2020, 8:04:16 PM11/9/20
to wx-dev
Hi,

On Mon, Nov 9, 2020 at 2:03 AM Igor Korot <ikor...@gmail.com> wrote:
>
> Paul,
>
> On Mon, Nov 9, 2020 at 1:33 AM Paul Cornett <paul...@gmail.com> wrote:
> >
> > Seems likely that the "jpeglib.h" that is being included does not have
> > an 'extern "C"' wrapper in it.
>
> I personally don't need jpeg support, so I will probably recompile wx
> without it.

Turns out it is a known issue with Solaris headers and there is a ticket inside
Oracle bug tracker.

Thank you.
Reply all
Reply to author
Forward
0 new messages