Прошу помощи у знающих и опытных камрадов. Я люблю всякое красноглазое задротство в консольке. Есть у меня хобби, игрульки для терминала собирать. Решил тут консольный пасьянс собрать, cpat называется. Я его собирал раз пять на разных системах, никогда проблем не было. Тут говорю консольке: «мейк, дружище». А он такой:
gcc -g -O2 -o cpat cpat.o common.o document.o highscores.o freecell.o klondike.o spider.o fortythieves.o bakersdozen.o scorpion.o penguin.o yukon.o strategy.o canfield.o duchess.o -lncurses -lncurses
/usr/bin/ld: common.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: common.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: common.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: document.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: document.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: document.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: highscores.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: highscores.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: highscores.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: freecell.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: freecell.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: freecell.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: klondike.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: klondike.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: klondike.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: spider.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: spider.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: spider.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: fortythieves.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: fortythieves.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: fortythieves.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: bakersdozen.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: bakersdozen.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: bakersdozen.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: scorpion.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: scorpion.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: scorpion.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: penguin.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: penguin.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: penguin.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: yukon.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: yukon.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: yukon.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: strategy.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: strategy.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: strategy.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: canfield.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: canfield.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: canfield.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
/usr/bin/ld: duchess.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: multiple definition of `hs'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:221: first defined here
/usr/bin/ld: duchess.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: multiple definition of `pauseleft'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:219: first defined here
/usr/bin/ld: duchess.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: multiple definition of `pauselength'; cpat.o:/home/hanzo/Documents/terminal_games/gamez_p0/cpat-1.2.1/src/cpat.h:218: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:212: cpat] Error 1
Говорит у тебя там мультипл дефинишен. Ну я-то не программист, я фиг его знает, что это за дефинишен, да к тому же мультипл. Пошёл, думаю, в другую игрульку сыграю. А там такая же байда.
Я не поленился, погуглил другой компилятор, нашел какой-то тини компайлер. Установил, говорю tcc: «а нука, собери мне cpat». И что вы думаете? Собрал. Перепроверил на других проблемных играх, тоже собрались.
Собственно вопрос. Что изменили в gcc, что код, который годами никто не трогал и который собирался у меня с помощью версий gcc, которые были в убунту 14.04, дебиане 9 и 10, перестал в новой версии собираться? А главное, зачем? Есть хорошее правило. Работает - не трожь. Вот и не надо трогать. Пусть старый код собирается. Он есть, пить не просит.