Author Topic: Which GCC compiler version do people recommend?  (Read 40171 times)

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Which GCC compiler version do people recommend?
« on: May 04, 2019, 09:30:43 pm »
Hi

I am building PMMail with gcc 4.92. If I use -O1 or -O2 optimization pmmail traps on loading a folder. If I use -Og or none it works fine. I am thinking this might be caused by a defect in 4.92. I am wondering what newer gcc version people recommend so I can test this theory?

Thanks

Gregg

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #1 on: May 04, 2019, 10:26:56 pm »
Hi Gregg, I'm using GCC 8.3.0 for my work, and I got GCC 9.1.0 building last night, so I'll probably switch to that soon.

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #2 on: May 04, 2019, 10:40:25 pm »
Hi Paul

Where can I get 8.3? Thanks

Gregg

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #4 on: May 05, 2019, 12:22:39 am »
Paul thanks for the link.

I got it to build but it doesn't run. No error message when I tried from command line. I have this in popuplog.os2.

05-04-2019  16:12:33  SYS2070  PID 0ceb  TID 0001  Slot 00f1
G:\PMMAIL\BIN\PMMAIL.EXE
PMMAIL->GCC1.___gthread_os2_mutex_lock
127

Any suggestions? Thanks

Gregg

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #5 on: May 05, 2019, 01:13:25 am »
I've been using GCC 5.5.0 to build Mozilla apps, should be on Paul's site. The C++ compilers changed too much to compile Mozilla after 6.0. 5.5.0 does seem to build a more stable browser. I'm using -O2.

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #6 on: May 05, 2019, 01:50:42 am »
Hi Dave,

Have you looked at the Firefox Unbranded version: https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds  which was mentioned this morning after the Mozilla cockup of certificates for addons for FF 60 and up (the Linux version looks interesting).

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #7 on: May 05, 2019, 01:54:52 am »
I got it to build but it doesn't run. No error message when I tried from command line. I have this in popuplog.os2.

05-04-2019  16:12:33  SYS2070  PID 0ceb  TID 0001  Slot 00f1
G:\PMMAIL\BIN\PMMAIL.EXE
PMMAIL->GCC1.___gthread_os2_mutex_lock
127

Any suggestions? Thanks

libgcc has changed/added functions since the GCC 4.9.2 version and corresponding libgcc1.dll

To avoid having to rely on an updated libgcc1.dll; I recommend you link with -static-libgcc which helps avoid a DLL dependency

Cheers,

Paul

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #8 on: May 05, 2019, 03:48:11 am »
Hi Ivan, that's the branding I'm using.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #9 on: May 05, 2019, 09:19:06 am »
For the brave.... http://smedley.id.au/tmp/gcc-9.1.0-os2-20190505.zip

Builds itself and Samba 4.10.1....

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #10 on: May 05, 2019, 10:52:21 pm »

libgcc has changed/added functions since the GCC 4.9.2 version and corresponding libgcc1.dll

To avoid having to rely on an updated libgcc1.dll; I recommend you link with -static-libgcc which helps avoid a DLL dependency

Cheers,

Paul

Thanks Paul

This worked unfortunately the resulting PMMail produced corrupted headers (blank from). It still trapped with -O1 or higher.

Gregg

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Which GCC compiler version do people recommend?
« Reply #11 on: May 06, 2019, 12:36:26 am »
I tried compiling and running the FFmpeg FATE test suite. On the positive side, no ffmpeg.exe hangs. On the negative side, lots of bus errors, and other weird errors such as meta data not being written, examples,
Code: [Select]

GEN     K:/fate.ffmpeg/src/tests/ref/fate/bmp-1bit
TEST    bmp-4bit
K:/fate.ffmpeg/src/tests/fate-run.sh fate-bmp-4bit "/fate.ffmpeg/fate-suite" "" "K:/fate.ffmpeg/build" 'framecrc -i /fate.ffmpeg/fate-suite/bmp/test4.bmp -pix_fmt rgb24' '' '' '' '1' '' '' '' '' '' '' '1' '' '' ''
 K:/fate.ffmpeg/build/ffmpeg.exe -nostdin -nostats -cpuflags all -hwaccel none -threads 1 -thread_type frame+slice -i /fate.ffmpeg/fate-suite/bmp/test4.bmp -pix_fmt rgb24 -bitexact -f framecrc -
--- K:/fate.ffmpeg/src/tests/ref/fate/bmp-4bit 2019-03-07 12:44:00.000000000 -0800
+++ tests/data/fate/bmp-4bit 2019-05-05 11:18:04.000000000 -0700
@@ -1,6 +0,0 @@
-#tb 0: 1/25
-#media_type 0: video
-#codec_id 0: rawvideo
-#dimensions 0: 127x64
-#sar 0: 0/1
-0,          0,          0,        1,    24384, 0x322d81f4
...
Code: [Select]
K:/fate.ffmpeg/build/ffmpeg.exe \
        -f lavfi -i "aevalsrc=cos(2*PI*t)*sin(2*PI*(440+4*t)*t):d=20" -f segment -segment_time 10 -map 0 -flags +bitexact -codec:a mp2fixed \
        -segment_list K:/fate.ffmpeg/build/tests/data/hls-list.m3u8 -y K:/fate.ffmpeg/build/tests/data/hls-out-%03d.ts 2>/dev/null
make: *** [tests/data/hls-list.m3u8] Bus error

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: Which GCC compiler version do people recommend?
« Reply #12 on: June 03, 2019, 07:42:24 pm »
I'm starting a new thread about compiling PMMail using GCC 4.9.2.

https://www.os2world.com/forum/index.php/topic,2092.0.html

Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com