5

We are trying to put a site into production mode but we get errors during the setup:di:compile step.

Below all the details I think are relevant:

Php 7.0.15

I have cleaned the cache with bin/magento cache:clean right before i executed the command.

When I try to run bin/magento setup:di:compile I get the following output:

Compilation was started.
Application code generator... 3/7 [============>---------------]  42% 55 secs 150.0 MiBPHP Fatal error:  Cannot declare interface Magento\Framework\DB\Adapter\AdapterInterface, because the name is already in use in /xxxxx/www/vendor/magento/framework/DB_bu/Adapter/AdapterInterface.php on line 15

Segmentation fault

We need the production mode because we are trying to optimise for better loading times.

Edit:

The error in the error log:

2017-03-23 16:10:54] main.INFO: Add of item with id Magento_Search::report_search_term was pro
cessed [] []
[2017-03-23 16:10:54] main.INFO: Add of item with id FME_Extensions::fmeextensions was processe
d [] []
[2017-03-23 16:10:54] main.INFO: Add of item with id FME_Extensions::productattachments was pro
#5 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(35
8): Magento\Framework\View\Asset\Merged->rewind()
#6 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(25
1): Magento\Framework\View\Page\Config\Renderer->renderAssetHtml('<script  type="...', Object(M
agento\Framework\View\Asset\Merged))
#7 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(22
6): Magento\Framework\View\Page\Config\Renderer->renderAssetGroup(Object(Magento\Framework\View
\Asset\PropertyGroup))
#8 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(99
): Magento\Framework\View\Page\Config\Renderer->renderAssets(Array)
#9 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Result/Page.php(235): Magen
to\Framework\View\Page\Config\Renderer->renderHeadContent()
#10 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Result/Layout.php(164): Ma
gento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor
))
#11 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Interceptor.php(74
): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Htt
p\Interceptor))
#12 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Chain/Chain.php(70
#5 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(3
58): Magento\Framework\View\Asset\Merged->rewind()
#6 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(2
51): Magento\Framework\View\Page\Config\Renderer->renderAssetHtml('<script  type="...', Object
(Magento\Framework\View\Asset\Merged))
#7 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(2
26): Magento\Framework\View\Page\Config\Renderer->renderAssetGroup(Object(Magento\Framework\Vi
ew\Asset\PropertyGroup))
#8 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(9
9): Magento\Framework\View\Page\Config\Renderer->renderAssets(Array)
#9 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Result/Page.php(235): Mage
nto\Framework\View\Page\Config\Renderer->renderHeadContent()
#10 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Result/Layout.php(164): M
agento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Intercept
or))
#11 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Interceptor.php(7
4): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\H
ttp\Interceptor))
#12 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Chain/Chain.php(7
0): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#5 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(
358): Magento\Framework\View\Asset\Merged->rewind()
#6 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(
251): Magento\Framework\View\Page\Config\Renderer->renderAssetHtml('<script  type="...', Obje
ct(Magento\Framework\View\Asset\Merged))
#7 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(
226): Magento\Framework\View\Page\Config\Renderer->renderAssetGroup(Object(Magento\Framework\
View\Asset\PropertyGroup))
#8 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(
99): Magento\Framework\View\Page\Config\Renderer->renderAssets(Array)
#9 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Result/Page.php(235): Mag
ento\Framework\View\Page\Config\Renderer->renderHeadContent()
#10 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Result/Layout.php(164):
Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interce
ptor))
#11 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Interceptor.php(
74): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response
\Http\Interceptor))
#12 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Chain/Chain.php(
70): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#6 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(251
): Magento\Framework\View\Page\Config\Renderer->renderAssetHtml('<script  type="...', Object(Mag
ento\Framework\View\Asset\Merged))
#7 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(226
): Magento\Framework\View\Page\Config\Renderer->renderAssetGroup(Object(Magento\Framework\View\A
sset\PropertyGroup))
#8 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Page/Config/Renderer.php(99)
: Magento\Framework\View\Page\Config\Renderer->renderAssets(Array)
#9 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Result/Page.php(235): Magent
o\Framework\View\Page\Config\Renderer->renderHeadContent()
#10 /data/sites/web/xxxxxxx/www/vendor/magento/framework/View/Result/Layout.php(164): Mag
ento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#11 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Interceptor.php(74)
: Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\
Interceptor))
#12 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Chain/Chain.php(70)
: Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#13 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Chain/Chain.php(63)
: Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult',
Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-varnish-...')
#14 /data/sites/web/xxxxxxx/www/vendor/magento/module-page-cache/Model/Controller/Result/
VarnishPlugin.php(74): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interceptio
n\Chain\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#15 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Chain/Chain.php(67)
: Magento\PageCache\Model\Controller\Result\VarnishPlugin->aroundRenderResult(Object(Magento\Fra
mework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Htt
p\Interceptor))
#16 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Interceptor.php(138
): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult',
 Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-builtin-...')
#17 /data/sites/web/xxxxxxx/www/vendor/magento/module-page-cache/Model/Controller/Result/
BuiltinPlugin.php(67): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interce
ption\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#18 /data/sites/web/xxxxxxx/www/vendor/magento/framework/Interception/Interceptor.php(142
): Magento\PageCache\Model\Controller\Result\BuiltinPlugin->aroundRenderResult(Object(Magento\Fr
amework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Ht
tp\Interceptor))
#19 /data/sites/web/xxxxxxx/www/var/generation/Magento/Framework/View/Result/Page/Interce
ptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Ar
ray, Array)
#20 /data/sites/web/xxxxxxx/www/vendor/magento/framework/App/Http.php(139): Magento\Frame
work\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Inter
ceptor))
#21 /data/sites/web/xxxxxxx/www/vendor/magento/framework/App/Bootstrap.php(258): Magento\
Framework\App\Http->launch()
#22 /data/sites/web/xxxxxxx/www/index.php(39): Magento\Framework\App\Bootstrap->run(Objec
t(Magento\Framework\App\Http))
#23 {main} [] []
  • Check the error log and post what it is ? – Manthan Dave Mar 24 '17 at 11:16
  • I updated the orignal question – Jarco Mar 24 '17 at 11:31
  • remove var/generation folder from your root directory and then try the same command – Manthan Dave Mar 24 '17 at 11:34
  • I renamed it and the error still occurs – Jarco Mar 24 '17 at 11:44
  • 2
    What is DB_bu? This directory should not exist – Fabian Schmengler Mar 27 '17 at 13:41
2

You have a directory called vendor/magento/framework/DB_bu that is causing the problem. My guess is that someone was making changes to the core files in vendor/magento/framework/DB and created DB_bu as a backup. That is what's causing the conflict so you need to remove this directory.

The vendor directory should not be tampered with. You should use a custom module to make changes.

  • This was indeed the problem. I want to add the bounty again, but the option seems to be gone. I will look into it and grant you the bounty. Edit: I can't because I don't have enough reputation to add a bounty a second time. Really sorry :( – Jarco Apr 13 '17 at 14:41
0

You have an issue with FME_Extensions extensions.

Please disable all modules of that.

Then all should work fine.

Alternatively, you can also check var\log or var\report

Then run php bin/magento setup:di:compile

  • Alas this still causes the error mentioned in the OP – Jarco Mar 31 '17 at 13:02
0

Try to disable all custom modules and reenable them step by step. This way you might find out which module is bugging and check if you can enable the others without getting this error. Dont forget to clear cache after disabeling and re-upgrading with console.

ANYHOW. You have an error with Renderer.php which indicates that the error appears when it is trying to inject or modify some sort of code, in your case a <script>-Tag.

This could be a XML problem, afaik. Have had the same problem with Renderer before on a bug for the layered navigation, so this maybe helps you, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.