Error macro date might prevent reproducible builds werror date time

What does this error message mean? I am trying to run make. It looks like configure is missing. Configure is part of the kernel source? make -C /lib/modules/4.2.0-19-generic/build SUBDIRS=/home/gl...

What does this error message mean? I am trying to run make. It looks like configure is missing. Configure is part of the kernel source?

make -C /lib/modules/4.2.0-19-generic/build SUBDIRS=/home/glochild/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE modules
make[1]: Entering directory '/usr/src/linux-headers-4.2.0-19-generic'
  CC [M]  /home/glochild/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.o
/home/glochild/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.c:55:6: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
  " " __TIME__ " " __DATE__ "n"
      ^
/home/glochild/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.c:55:19: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
  " " __TIME__ " " __DATE__ "n"
                   ^
cc1: some warnings being treated as errors
scripts/Makefile.build:264: recipe for target '/home/glochild/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.o' failed
make[2]: *** [/home/glochild/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.o] Error 1
Makefile:1398: recipe for target '_module_/home/glochild/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE' failed
make[1]: *** [_module_/home/glochild/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-19-generic'
Makefile:30: recipe for target 'default' failed
make: *** [default] Error 2

Iharob Al Asimi's user avatar

asked Jan 14, 2016 at 20:09

Natus Drew's user avatar

2

I understand this is due to the warning being added to later versions of GCC, which would originally compile with eg -Wall, but now no longer do so due to this additional restriction.

If you cannot fix it using the makefile mods above, I have fixed it in my own driver builds by bracketing just the offending line(s) of source with:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdate-time"
... code with __DATE_ __TIME__
#pragma GCC diagnostic pop

which turns the ‘new’ diagnostic off for the affected lines only.

answered Oct 3, 2017 at 13:16

MikeW's user avatar

MikeWMikeW

5,2121 gold badge33 silver badges28 bronze badges

In your Makefile add this to the CFLAGS variable

-Wno-date-time

this will disable the warning, and since warnings are treated as errors because the Makefile is passing -Werror with the CFLAGS the code can’t compile.

answered Jan 14, 2016 at 20:11

Iharob Al Asimi's user avatar

Iharob Al AsimiIharob Al Asimi

52.4k6 gold badges59 silver badges96 bronze badges

2

So I have been trying to install Realtek Audio Drivers but after make install I get :

-Werror=date-time/macro “DATE” might prevent reproducible builds

I saw a post with a similar issue but I did not understand what to exactly type in the terminal. The post had said that I should add -Wno-error=date-time to CFLAGS which I do not how to do. I will link the post below.

How to disable -Werror=date-time/macro «__DATE__» might prevent reproducible builds

I am using Ubuntu 17.04 64bit.

Also please do not post as replicate since the other posts did not help me and I cannot comment on them due to lack of privilege points.

Results of sudo lshw -C sound

  *-multimedia              
      description: Audio device
      product: 200 Series PCH HD Audio
      vendor: Intel Corporation
      physical id: 1f.3
      bus info: pci@0000:00:1f.3
      version: 00
      width: 64 bits
      clock: 33MHz
      capabilities: pm msi bus_master cap_list
      configuration: driver=snd_hda_intel latency=32
      resources: irq:133 memory:df240000-df243fff memory:df220000-df22ffff

pavucontrol and alsamixer results are linked below respectively :
enter image description here
enter image description here

asked Aug 14, 2017 at 14:36

Amin's user avatar

AminAmin

411 gold badge2 silver badges6 bronze badges

1

Edit your source code Makefile and add this near the top of the file (if you look closely, this line may already be there, but just commented out):

EXTRA_CFLAGS += -Wno-error=date-time

Then do your normal ./configure (if required) and make and sudo make install.

Update #1:

If the source code that you’re using is from http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=24&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false then they’re only for kernels 2.x and 3.x, and as such, won’t compile on current versions of Ubuntu.

answered Aug 14, 2017 at 15:49

heynnema's user avatar

heynnemaheynnema

66.1k13 gold badges115 silver badges170 bronze badges

9

If you’re talking about these drivers then it’s not that simple.

It’s the kernel build scripts that enforce this logic and the error flag is added after any normal means of injecting the no-error counterpart. Thus, the error remains.

The only fix I see is temporarily remove that line from the kernel build makefile:

sudo sed -i.bak '/date-time/d' /usr/src/linux-headers-4.10.0-32/Makefile

However, that gets you only to the next problem:

implicit declaration of function ‘do_posix_clock_monotonic_gettime’

Which is a real problem caused by aging unmaintained source.

After this experiment, make sure you restore the original Makefile:

 sudo mv /usr/src/linux-headers-4.10.0-32/Makefile.bak 
     /usr/src/linux-headers-4.10.0-32/Makefile

answered Aug 14, 2017 at 16:29

Melvyn Sopacua's user avatar

2

Содержание

  1. Arch Linux
  2. #1 2014-06-25 15:55:44
  3. [SOLVED] PEAK PCAN-Dongle — macro «__DATE__»
  4. #2 2014-07-10 09:07:44
  5. Re: [SOLVED] PEAK PCAN-Dongle — macro «__DATE__»
  6. #3 2014-07-10 09:55:16
  7. Re: [SOLVED] PEAK PCAN-Dongle — macro «__DATE__»
  8. Как отключить-Werror=date-time/macro “__, ДАТА __” могла бы предотвратить восстанавливаемые сборки
  9. 3 ответа
  10. Date and Time Error #4
  11. Comments
  12. Footer
  13. Русские Блоги
  14. error: macro «__TIME__» might prevent reproducible builds [-Werror=date-time]
  15. Проблема
  16. Когда модуль ядра компилируется, следующее сообщение об ошибке вдруг запрос:
  17. среда разработки 1,1
  18. 2. Позиционирование
  19. [PATCH 7/7] Makefile: Build with -Werror=date-time if the compilersupports it
  20. 3. Решение
  21. Шумы при записи с микрофона.
  22. шшшшш

Arch Linux

You are not logged in.

#1 2014-06-25 15:55:44

[SOLVED] PEAK PCAN-Dongle — macro «__DATE__»

I’m trying to install the PEAKs PCAN-USB drivers.
I’m getting both time and data macro errors:

The compiler output is:

There were none -Werror flags in any of the make files, and i’ve removed -Wall from the make files, just to see, both the sammer error occurs.

I have no idea why this is :S

I found a post with similar error messages (https://bbs.archlinux.org/viewtopic.php?id=180922), but seemd not to be usefull for this problem

Last edited by lbromo (2014-07-10 09:55:49)

#2 2014-07-10 09:07:44

Re: [SOLVED] PEAK PCAN-Dongle — macro «__DATE__»

Today I hit the exactly same problem when I tried to use PCAN-USB on arch. I could work around this by adding «-Wno-error=date-time» to _CFLAGS in the Makefile. Alternatively you can use the RT_CFLAGS environment variable which is used by the Makefile. However, this work around works only for PCAN-USB driver since only this Makefile uses the RT_CFLAGS I guess.

#3 2014-07-10 09:55:16

Re: [SOLVED] PEAK PCAN-Dongle — macro «__DATE__»

Thank you for posting a solution

Источник

Как отключить-Werror=date-time/macro “__, ДАТА __” могла бы предотвратить восстанавливаемые сборки

Я пытаюсь скомпилировать драйвер для адаптера Netis WF2190. Да, я просто загрузил последнее от них.

Как я могу отключить -Werror=date-time в сборке? Я не могу найти его нигде в сценарии сборки, таким образом, я полагаю, что это должна быть некоторая глобальная настройка по умолчанию. Очевидно код просто пытается встроить дату/время сборки в вывод, таким образом, не должно быть никакой проблемы с отключением этого предупреждения.

Вот некоторые предупреждения, которые я получаю, которые рассматривают как ошибки:

3 ответа

Дата и время, предупреждающая, является новой в gcc 4.9, я думаю — это возможно включено неявно -Wall (и превращено ошибка неявно -Werror ).

Вы могли попытаться выключить его явно использование эти -Wno- форма т.е. путем добавления

Я попробовал, довольно много раз добавив «Wno-error=date-time» строка к CFLAGS, но это, казалось, не работало.

самое легкое решение безусловно для меня состояло в том, чтобы найти файл, который производил «__ ДАТА __» строка путем выполнения

, который (для исходного кода, с которым я работаю) дал мне файл

, я просто изменил это на строку без переменной путем удаления кавычек, т.е.

, компиляция затем смогла продолжиться

РЕДАКТИРОВАНИЕ: , Как упомянуто прежде, используйте make clean , прежде чем выполнение настроит и сделает, или еще лучше, извлечет новую версию из файла

Источник

Date and Time Error #4

I am getting these 2 errors while installing your drivers. please suggest some solution. I am running this driver on ubuntu GNOME version 16.04.1.

** #error: macro «DATE» might prevent reproducible builds [-Werror=
macro «DATE» might prevent reproducible builds [-Werror=date-time]
DBG_871X(«build time: %s %sn», DATE, TIME);**
^
/home/jay/Downloads/TL-WN725N-V2-Driver-for-Linux-master/os_dep/linux/usb_intf.c:1535:44: error: macro «TIME» might prevent reproducible builds [-Werror=date-time]
DBG_871X(«build time: %s %sn», DATE, TIME);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target ‘/home/jay/Downloads/TL-WN725N-V2-Driver-for-Linux-master/os_dep/linux/usb_intf.o’ failed
make[2]: *** [/home/jay/Downloads/TL-WN725N-V2-Driver-for-Linux-master/os_dep/linux/usb_intf.o] Error 1
Makefile:1420: recipe for target ‘module/home/jay/Downloads/TL-WN725N-V2-Driver-for-Linux-master’ failed
make[1]: *** [module/home/jay/Downloads/TL-WN725N-V2-Driver-for-Linux-master] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-4.4.0-77-generic’
Makefile:582: recipe for target ‘modules’ failed
make: *** [modules] Error 2

The text was updated successfully, but these errors were encountered:

I have the same problem on ubuntu16.04

It looks like these two lines are for debugging purpose, so commenting these maybe solve the problem.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Русские Блоги

error: macro «__TIME__» might prevent reproducible builds [-Werror=date-time]

Проблема

Когда модуль ядра компилируется, следующее сообщение об ошибке вдруг запрос:

среда разработки 1,1

2. Позиционирование

Во-первых, я подтверждаю, что следующий код «Module_Description __version__» строить на «____» «__date___» «__DATE__)» «

Добавлено в 4.9 (включительно версии GCC) -WDATE-TIME сигнал тревоги, если используется в коде модуля ядра __DATE__, __TIME__ или __timestamp__ Эти макросы будут генерировать эти ошибки;

[PATCH 7/7] Makefile: Build with -Werror=date-time if the compilersupports it

  • Next message:Josh Triplett: «[PATCH 3/7] staging: rtl8188eu: Drop print of build date/time»
  • Previous message:Josh Triplett: «[PATCH 6/7] x86: math-emu: Drop already-disabled print of build date»
  • Messages sorted by:[ date ][ thread ][ subject ][ author ]

GCC 4.9 and newer have a new warning -Wdate-time, which warns on any use
of __DATE__, __TIME__, or __TIMESTAMP__, which would make the build
non-deterministic. Now that the kernel does not use any of those
macros, turn on -Werror=date-time if available, to keep it that way.

The kernel already (optionally) records this information at build time
in a single place; other kernel code should not duplicate that.

Signed-off-by: Josh Triplett

Makefile | 3 +++
1 file changed, 3 insertions(+)

diff —git a/Makefile b/Makefile
index 14d592c..188eea7 100644
— a/Makefile
+++ b/Makefile
@@ -668,6 +668,9 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int)
# require functions to have arguments in prototypes, not empty ‘int foo()’
KBUILD_CFLAGS += $(call cc-option,-Werror=strict-prototypes)

+# Prohibit date/time macros, which would make the build non-deterministic
+KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
+
# use the deterministic mode of AR if available
KBUILD_ARFLAGS := $(call ar-option,D)


To unsubscribe from this list: send the line «unsubscribe linux-kernel» in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

3. Решение

Решения имеют следующие, можно выбрать в соответствии с требованиями

Первое решение добавляет следующие опции в Makefile

Комментарий на KBUILD_CFLAGS + = $ (Call-CC-Option, -Werror = ДАТА-ВРЕМЯ)

Примечание: Этот метод решает эту проблему, но изменить свойства самой системы, не рекомендуется

Этот подход также рекомендуемый метод, изменить файл Makefile модуля ядра, добавьте строку

ccflags-y+=$(shell if [ $(call cc-version) -ge 0490 ] ; then echo «-Wno-error=date-time -Wno-date-time»; fi 😉

Каталог верхнего уровня в Linux ядро ​​также файл Makefile ниже корневого каталога. Существует переменная «kbuild_cflags», который хранится в этом $ (kBuild_cflags) является вариант компиляции передается GCC компилятора, если скомпилированный файл в GCC при компиляции, нет специальных требований использовать параметры компиляции в $ (kBuild_cflags).

Источник

Шумы при записи с микрофона.

Здравствуйте. Уже пару дней пытаюсь разобраться в чём причина шумов с микрофона. Менял в alsamixer значения, как только не передвигал ползунки в pavucontrol, частоту дискредитации исправил на 48000, включал шумоподавление в pulseaudio и так далее из того что нашёл в гугле, но проблема осталась. На этом же ноутбуке, этот же микрофон на window 7 работает идеально, а тут (linux mint 18 xfce) такие проблемы . Помогите разобраться.

Это все пыщьпыщьаудио виноват! Атвичаю!

Пыш-пыш-аудио отключи и сравни.

Ребят, он не врубается, чую. ОП, выруби PulseAudio. Как это сделать? Гугл в помощь. Если не поможет, то напиши.

Okay, отключил и сравнил; С отключенным пульсом, шум и соответственно и голос стали тише. Избавиться от шума никак? Или заменить на что-то pulse?

У меня не трещит. Шум постоянный, гудит в зависимости от громкости микрофона.

Может я не так что-то сделал: В /etc/pulse/client.conf добавил autospawn = no и потом pulseaudio —kill

Выпилить=удалить. sudo apt-get remove pulseaudio.

Удалил и перезагрузился. Изменений нет.

Спойлер: придется переставит пшшаудио.

По ссылке был, в пп написал что не помогло. Переставлять подскажите как.

sudo apt-get install pulseaudio

По ссылкам что вы дали, ничего не помогает. P.S. Значок громкости пропал.

Как настроены разъемы звуковухи? Она точно считает гнездо с микрофоном именно гнездом с микрофоном?

да, считает гнездо с микрофоном именно гнездом с микрофоном

Может скрины что-то подскажут? Как видно, уровень шума высокий, хотя я ничего не говорю в микрофон. Если уменьшить громкость микрофона, то и шум становится тише. http://i.imgur.com/5iQSD5J.png

Попробуй выключить усиление микрофона, Mic Boost в alsamixer, и отрегулировать соответственно уровень записи на самом микрофоне.

Попробовал, если Mic Boost отключить то уровень громкости микрофона становится 30%. Соответственно, громкость шума вместе с громкостью голоса уменьшается. Если громкость увеличить, включается Mic Boost. http://i.imgur.com/6MKIP25.png

шшшшш

Дрова проверь для аудиоплаты и портов микрофона.

И ещё есть дополнительный шум, если включить ноут в розетку. https://clyp.it/1x35pr4s Но этот вопрос уже связан с заземлением?

Почему в windows ничего подобного нет а в линуксе так? Может драйвер надо установить какой?

попробуйте так: arecord -r 192000 -f cd -t wav|aplay

и так: arecord|aplay

в последнем случае характерны шумы — это качество записи как правило т.е. софтовые проблемы

В аудасити пробовал. Попробовал как и вы написали в первом случае качество голоса чётче, но шшшш присутствует. Во втором случае качество плохое, но тоже с шумом.

Если переставлять джек в разьём для наушников то запись не идёт, всё тихо (если вы это имели ввиду).

Все подходит? Просто если мать амдшная, а дрова интеловские, то ничего и не будет работать. Какая модель ноутбука?

PS: Если все подходит, то можешь пересобрать ядро и/или обновить OS.

Acer aspire e1-531 Ос обновил и переустановил. Карта HDA Intel PCH Realtek alc269vb

Ничего не помогает.

Хотя нет, там просто написано, что система запустится.

Хз, может поможет.

Я пробовал до создания темы установить этот драйвер но у меня ошибки выскакивали, не мог понять их причину и так и не смог установить его до конца!

./configure && make && make install

именно так, так в ридми написано но ошибка появляется

Или откатись. В общем, отпишись давай.

Уже установлен пакет gcc самой новой версии (4:5.3.1-1ubuntu1). Ошибка та же.

Ага, самая новая — 6.3.

error: macro «__DATE__» might prevent reproducible builds [-Werror=date-time] «Compiled on » __DATE__ » for kernel %s» ^

cc1: some warnings being treated as errors

gcc version 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11

Странно. Есть, конечно, вероятность, что компилять надо с помощью какой-то экзотической версии gcc, но это уже не к нам. Зы: попробуй пересобрать ведро.

Извините, не знаю как.

А ядро уже советовали пересобрать? Лан, шучу.

Возможно, что в виндовом драйвере включено шумоподавление. У меня старый ноут так шумел. Включаешь шумоподавление — не шипит, но звук становится мерзкий. Во втором файле пик чётко на 50 герцах, навряд ли это софт 🙂

Возможно ещё какой-нибудь прибор шумит, кроме самого ноутбука. Я имею в виду электромагнитные наводки и помехи.

Если есть винда, то запиши какой-нибудь стишок на ней и в линуксе и сравни качество. Сохранять лучше во flac или wav. Шумоподавление часто срезает высокие частоты, да и в общем качество звука должно ухудшиться. Попробуй ещё отключить в alsamixer остальные входы звуковой карты, если ещё не советовали.

Если хочешь, то можешь записи сюда выложить, я тебе скажу своё икспертное мнение 🙂

Запись с линукса: https://clyp.it/pude2wg1 громкость сразу у себя пониже сделайте) Запись с виндовса: https://clyp.it/evax5ww2

P.S. С виндовс’a когда прослушивал, шум был тише, а когда щас с линукса прослушал — шум громче оказывается Оо.

Среди приборов есть только модем с вай-фаем.

Источник

@hardywu

I was trying to compile on arch linux with linux 3.15.5-1

/home/user/Downloads/rtl8188eu/os_dep/usb_intf.c: In function ‘rtw_drv_entry’:
/home/user/Downloads/rtl8188eu/os_dep/usb_intf.c:869:51: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
  DBG_88E("build time: %s %sn", __DATE__, __TIME__);
                                                   ^
/home/user/Downloads/rtl8188eu/os_dep/usb_intf.c:869:1: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
  DBG_88E("build time: %s %sn", __DATE__, __TIME__);
 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:318: recipe for target '/home/user/Downloads/rtl8188eu/os_dep/usb_intf.o' failed
make[2]: *** [/home/user/Downloads/rtl8188eu/os_dep/usb_intf.o] Error 1
Makefile:1310: recipe for target '_module_/home/user/Downloads/rtl8188eu' failed
make[1]: *** [_module_/home/user/Downloads/rtl8188eu] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.15.5-1-ARCH/build'
Makefile:146: recipe for target 'modules' failed
make: *** [modules] Error 2

@Ryanel

I made a patch to fix this issue

@lwfinger

Why are you using the GitHub version for kernel 3.15.5????? That driver has been inside the kernel since 3.12, and that issue was fixed there ages ago. As far as I remember, ARCH Linux builds everything from source.

This GitHub repo is left online as a courtesy to users of old kernels. People with new kernels are expected to use the in-kernel code as it has a lot of changes that will never be backported to here!

@hardywu

The built in driver in arch does not work with tplink wn725n in wpa network. I have to blacklist that driver in order to connect to the network using this compiled one.

@hardywu

@kalski

Hi all.

I’m trying to install the PEAKs PCAN-USB drivers.
I’m getting both time and data macro errors:

macro "__DATE__" might prevent reproducible builds
macro "__TIME__" might prevent reproducible builds

The compiler output is:

***
*** Host machine kernel version=3.15.1-1-ARCH
*** Driver kernel version=3.15.1-1-ARCH
*** Path to kernel sources=/lib/modules/3.15.1-1-ARCH/build
*** use KBUILD=yes
***
make -C /lib/modules/3.15.1-1-ARCH/build SUBDIRS=/home/lbromo12/builds/peak-linux-driver-7.11/driver        EXTRA_CFLAGS="-I/home/lbromo12/builds/peak-linux-driver-7.11/driver        -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DDONGLE_SUPPORT -DPCCARD_SUPPORT -DNO_NETDEV_SUPPORT -DNO_RT " V=0 modules
make[2]: Entering directory '/usr/lib/modules/3.15.1-1-ARCH/build'
  CC [M]  /home/lbromo12/builds/peak-linux-driver-7.11/driver/src/pcan_main.o
/home/lbromo12/builds/peak-linux-driver-7.11/driver/src/pcan_main.c: In function ‘pcan_read_procmem’:
/home/lbromo12/builds/peak-linux-driver-7.11/driver/src/pcan_main.c:396:3: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
   __DATE__, __TIME__);
   ^
/home/lbromo12/builds/peak-linux-driver-7.11/driver/src/pcan_main.c:396:13: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
   __DATE__, __TIME__);
             ^
cc1: some warnings being treated as errors

There were none -Werror flags in any of the make files, and i’ve removed -Wall from the make files, just to see, both the sammer error occurs.

I have no idea why this is :S

I found a post with similar error messages (https://bbs.archlinux.org/viewtopic.php?id=180922), but seemd not to be usefull for this problem sad

Last edited by lbromo (2014-07-10 09:55:49)

/home/user/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.c:1065:22: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
   "Compiled on " __DATE__ " for kernel %s"
                  ^
cc1: some warnings being treated as errors

I’ve tried to

export CFLAGS="-Wno-error=date-time"

but nothing changed.

asked Oct 28, 2015 at 16:19

Vyacheslav's user avatar

VyacheslavVyacheslav

2311 gold badge4 silver badges10 bronze badges

It’s hard to judge just by output of gcc, please add compiling invocation command line.
Generally, developers add -Werror gcc command line switch to prevent successful build when there are any warnings triggered during compiling, and «[-Werror=date-time]» is just a name of that triggered warning, not a switch you should find and change.

Try first disabling -Werror by removing it from CFLAGS or grepping it in your source directory recursively: fgrep -lr -- -Werror ., then removing it from each found file.

answered Oct 30, 2015 at 15:50

Я пытаюсь скомпилировать драйвер для адаптера Netis WF2190. Да, я просто загрузил последнее от них.

Как я могу отключить -Werror=date-time в сборке? Я не могу найти его нигде в сценарии сборки, таким образом, я полагаю, что это должна быть некоторая глобальная настройка по умолчанию. Очевидно код просто пытается встроить дату/время сборки в вывод, таким образом, не должно быть никакой проблемы с отключением этого предупреждения.

Вот некоторые предупреждения, которые я получаю, которые рассматривают как ошибки:

/home/andy/RTL8812AU_linux_v4.3.8_12175.20140902/driver/rtl8812AU_linux_v4.3.8_12175.20140902/core/rtw_debug.c:66:1: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
/home/andy/RTL8812AU_linux_v4.3.8_12175.20140902/driver/rtl8812AU_linux_v4.3.8_12175.20140902/core/rtw_debug.c:66:1: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
cc1: some warnings being treated as errors

задан
8 September 2017 в 08:35

поделиться

3 ответа

Дата и время, предупреждающая, является новой в gcc 4.9, я думаю — это возможно включено неявно -Wall (и превращено ошибка неявно -Werror).

Вы могли попытаться выключить его явно использование эти -Wno- форма т.е. путем добавления

-Wno-error=date-time 

к CFLAGS.

ответ дан steeldriver
23 November 2019 в 03:19

поделиться

Я попробовал, довольно много раз добавив «Wno-error=date-time» строка к CFLAGS, но это, казалось, не работало.

самое легкое решение безусловно для меня состояло в том, чтобы найти файл, который производил «__ ДАТА __» строка путем выполнения

grep -r "__DATE__"

, который (для исходного кода, с которым я работаю) дал мне файл

acore/info.patch:+          "Compiled on " __DATE__ " for kernel %s"

, я просто изменил это на строку без переменной путем удаления кавычек, т.е.

"Compiled on __DATE__ for kernel %s"

, компиляция затем смогла продолжиться

РЕДАКТИРОВАНИЕ: , Как упомянуто прежде, используйте make clean, прежде чем выполнение настроит и сделает, или еще лучше, извлечет новую версию из файла

zip/tar

ответ дан tmck-code
23 November 2019 в 03:19

поделиться

Могло бы быть лучше удалить незаконный макрос путем удаления строки 66 из rtw_debug.c файла.

sed -i -e '66d' /home/andy/RTL8812AU_linux_v4.3.8_12175.20140902/driver/rtl8812AU_linux_v4.3.8_12175.20140902/core/rtw_debug.c

Теперь можно продолжить сборку:

cd /home/andy/RTL8812AU_linux_v4.3.8_12175.20140902/
sudo make clean
make
sudo make install

ответ дан mchid
23 November 2019 в 03:19

поделиться

Другие вопросы по тегам:

Похожие вопросы:

Понравилась статья? Поделить с друзьями:
  • Error m587 failed to add ssid to remembered list another spi transfer is pending
  • Error m587 expected string expression
  • Error m3u8 download detected but ffmpeg or avconv could not be found please install one
  • Error lvalue required as unary operand
  • Error lvalue required as left operand of assignment перевод