LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-24-2021, 08:54 AM   #1
yabobay
Member
 
Registered: Jul 2019
Distribution: Debian Sid
Posts: 44

Rep: Reputation: Disabled
Unhappy "narrowing conversion" error while compiling QUASI88 emulator.


I've been trying to compile the QUASI88 PC-88 emulator. It all goes swimmingly, before culminating in this error:

Code:
src/fmgen/psg.cpp: In member function ‘void PSG::MakeEnvelopTable()’:
src/fmgen/psg.cpp:121:44: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8’ {aka ‘unsigned char’} [-Wnarrowing]
  121 |  static uint8 table3[4] = {  0,  1, -1,  0 };
      |                                            ^
make: *** [Makefile:956: obj/fmgen/psg.o] Error 1
I googled this error, but what i found was errors that happened to people who were trying to develop software, so that doesn't apply to me. The program is also way obscure, so i can't exactly find any documentation for compiling, let alone in a language i speak.

I'm on Linux Mint 20.2 with GNU Make 4.2.1, GCC 9.3.0 and G++ 9.3.0.

If this isn't the right place for this question, i'm sorry, but i don't know anywhere else for "help i can't compile this obscure piece of software".
 
Old 07-24-2021, 09:46 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,246

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Build an older version of gcc and compile it with that.
 
Old 07-24-2021, 10:13 AM   #3
yabobay
Member
 
Registered: Jul 2019
Distribution: Debian Sid
Posts: 44

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
Build an older version of gcc and compile it with that.
After reading this reply, i installed the gcc-7 and g++-7 packages from Linux Mint's repositories, and got the following error:

Code:
make: g++: Command not found
So i aliased g++ to g++-7, and still get the same error when running make.
 
Old 07-24-2021, 10:37 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
Code:
sed -i 's/^CXXFLAGS =/& -Wno-narrowing/' Makefile
 
Old 07-24-2021, 10:55 AM   #5
yabobay
Member
 
Registered: Jul 2019
Distribution: Debian Sid
Posts: 44

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Code:
sed -i 's/^CXXFLAGS =/& -Wno-narrowing/' Makefile
Hey thanks! You actually fixed the actual problem.
 
  


Reply

Tags
compilation, emulator



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] GAWK Narrowing Down Search Results metallica1973 Programming 2 12-22-2012 07:44 AM
Narrowing down distro choice for a newbie Inafune Linux - Newbie 19 06-07-2006 04:52 PM
Python - need help narrowing a regular expression rose_bud4201 Programming 2 10-30-2005 12:37 AM
Narrowing the IP pool on my Router jong357 Linux - Wireless Networking 4 11-05-2004 07:54 PM
Narrowing down MY Desktop Distro choices Paul Parr Linux - Distributions 12 04-27-2003 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration