emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

Emscripten Fails to Build Qt5 App - Please Help

Open DragonOsman opened this issue 7 years ago • 50 comments

I'm trying to build a Qt5 app to Wasm and I passed this command:

em++ -std=c++17 -Wall -pedantic -I"C:\Qt\5.13.1\wasm_32\include" -I"C:\Qt\5.13.1\wasm_32\include\QtCore" -I"C:\Qt\5.13.1\wasm_32\include\QtPrintSupport" -I"C:\Qt\5.13.1\wasm_32\include\QtWidgets" main.cpp notepad.cpp -LC:\Qt\5.13.1\wasm_32\lib -s WASM=1 -s EXPORT_ALL=1 -o notepad.js 2> build.log

Here's a link to the build.log file.

main.cpp:

#include "notepad.h"

#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication EditorApp(argc, argv);
    Notepad Editor;
    Editor.show();

    return EditorApp.exec();
}

notepad.h:

#ifndef NOTEPAD_H
#define NOTEPAD_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui
{
class Notepad;
}
QT_END_NAMESPACE

class Notepad : public QMainWindow
{
    Q_OBJECT

public:
    explicit Notepad(QWidget *parent = nullptr);
    ~Notepad();

private slots:
    void on_actionNew_triggered();

    void on_actionOpen_triggered();

    void on_actionSave_triggered();

    void on_actionSave_As_triggered();

    void on_actionPrint_triggered();

    void on_actionExit_triggered();

    void on_actionCopy_triggered();

    void on_actionCut_triggered();

    void on_actionPaste_triggered();

    void on_actionUndo_triggered();

    void on_actionRedo_triggered();

    void on_actionSelect_Font_triggered();

    void on_actionBold_triggered();

    void on_actionItalic_triggered();

    void on_actionUnderline_triggered();

private:
    Ui::Notepad *ui;
    QString current_file;
};
#endif // NOTEPAD_H

notepad.cpp:

#include "notepad.h"
#include "../build-notepad-project-Desktop_Qt_5_13_1_MSVC2017_64bit-Release/ui_notepad.h"

#include <QFileDialog>
#include <QMessageBox>
#include <QTextStream>
#include <QPrinter>
#include <QPrintDialog>
#include <QFontDialog>
#include <QFile>

Notepad::Notepad(QWidget *parent)
    : QMainWindow{parent}
    , ui{new Ui::Notepad}
{
    ui->setupUi(this);
    this->setCentralWidget(ui->textEdit);

    connect(ui->actionNew, &QAction::triggered, this, &Notepad::on_actionNew_triggered);
    connect(ui->actionOpen, &QAction::triggered, this, &Notepad::on_actionOpen_triggered);
    connect(ui->actionSave, &QAction::triggered, this, &Notepad::on_actionSave_triggered);
    connect(ui->actionSave_As, &QAction::triggered, this, &Notepad::on_actionSave_As_triggered);
    connect(ui->actionPrint, &QAction::triggered, this, &Notepad::on_actionPrint_triggered);
    connect(ui->actionExit, &QAction::triggered, this, &Notepad::on_actionExit_triggered);
    connect(ui->actionCopy, &QAction::triggered, this, &Notepad::on_actionCopy_triggered);
    connect(ui->actionCut, &QAction::triggered, this, &Notepad::on_actionCut_triggered);
    connect(ui->actionPaste, &QAction::triggered, this, &Notepad::on_actionPaste_triggered);
    connect(ui->actionUndo, &QAction::triggered, this, &Notepad::on_actionUndo_triggered);
    connect(ui->actionRedo, &QAction::triggered, this, &Notepad::on_actionRedo_triggered);
    connect(ui->actionSelect_Font, &QAction::triggered, this, &Notepad::on_actionSelect_Font_triggered);
    connect(ui->actionBold, &QAction::triggered, this, &Notepad::on_actionBold_triggered);
    connect(ui->actionItalic, &QAction::triggered, this, &Notepad::on_actionItalic_triggered);
    connect(ui->actionUnderline, &QAction::triggered, this, &Notepad::on_actionUnderline_triggered);

    // Disable menu actions for unavailable features
#if !QT_CONFIG(printer)
    ui->actionPrint->setEnabled(false);
#endif

#if !QT_CONFIG(clipboard)
    ui->actionCut->setEnabled(false);
    ui->actionCopy->setEnabled(false);
    ui->actionPaste->setEnabled(false);
#endif
}

Notepad::~Notepad()
{
    delete ui;
}


void Notepad::on_actionNew_triggered()
{
    current_file.clear();
    ui->textEdit->setText(QString());
}

void Notepad::on_actionOpen_triggered()
{
    QString file_name = QFileDialog::getOpenFileName(this, "Open the file");
    QFile file(file_name);

    current_file = file_name;
    if (!file.open(QIODevice::ReadOnly | QFile::Text))
    {
        QMessageBox::warning(this, "Warning", "Cannot open file: " + file.errorString());
        return;
    }

    setWindowTitle(file_name);
    QTextStream in(&file);
    QString text = in.readAll();
    ui->textEdit->setText(text);
    file.close();
}

void Notepad::on_actionSave_triggered()
{
    QString file_name;

    // If we don't have a filename from before, get one.
    if (current_file.isEmpty())
    {
        file_name = QFileDialog::getSaveFileName(this, "Save");
        current_file = file_name;
    }
    else
    {
        file_name = current_file;
    }

    QFile file(file_name);
    if (!file.open(QIODevice::WriteOnly | QFile::Text)) {
        QMessageBox::warning(this, "Warning", "Cannot save file: " + file.errorString());
        return;
    }

    setWindowTitle(file_name);
    QTextStream out(&file);
    QString text = ui->textEdit->toPlainText();
    out << text;
    file.close();
}

void Notepad::on_actionSave_As_triggered()
{
    QString file_name{QFileDialog::getSaveFileName(this, "Save as")};
    QFile file{file_name};

    if (!file.open(QFile::WriteOnly | QFile::Text))
    {
        QMessageBox::warning(this, "Warning", "Cannot save file: " + file.errorString());
        return;
    }

    current_file = file_name;
    setWindowTitle(file_name);
    QTextStream out{&file};
    QString text{ui->textEdit->toPlainText()};
    out << text;
    file.close();
}

void Notepad::on_actionPrint_triggered()
{
#if QT_CONFIG(printer)
    QPrinter print_device;
#if QT_CONFIG(printdialog)
    QPrintDialog dialog{&print_device, this};
    if (dialog.exec() == QDialog::Rejected)
    {
        return;
    }
#endif // QT_CONFIG(printdialog)
#endif // QT_CONFIG(printer)
}

void Notepad::on_actionExit_triggered()
{
    QCoreApplication::quit();
}

void Notepad::on_actionCopy_triggered()
{
#if QT_CONFIG(clipboard)
    ui->textEdit->copy();
#endif
}

void Notepad::on_actionCut_triggered()
{
#if QT_CONFIG(clipboard)
    ui->textEdit->cut();
#endif
}

void Notepad::on_actionPaste_triggered()
{
#if QT_CONFIG(clipboard)
    ui->textEdit->paste();
#endif
}

void Notepad::on_actionUndo_triggered()
{
    ui->textEdit->undo();
}

void Notepad::on_actionRedo_triggered()
{
    ui->textEdit->redo();
}

void Notepad::on_actionSelect_Font_triggered()
{
    bool font_selected;
    QFont font{QFontDialog::getFont(&font_selected, this)};

    if (font_selected)
    {
        ui->textEdit->setFont(font);
    }
}

void Notepad::on_actionBold_triggered()
{
    ui->textEdit->setFontWeight(QFont::Weight::Bold);
}

void Notepad::on_actionItalic_triggered()
{
    ui->textEdit->setFontItalic(true);
}

void Notepad::on_actionUnderline_triggered()
{
    ui->textEdit->setFontUnderline(true);
}
```ui_notepad.h:
```cpp
/********************************************************************************
** Form generated from reading UI file 'notepad.ui'
**
** Created by: Qt User Interface Compiler version 5.13.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/

#ifndef UI_NOTEPAD_H
#define UI_NOTEPAD_H

#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QStatusBar>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>

QT_BEGIN_NAMESPACE

class Ui_Notepad
{
public:
    QAction *actionNew;
    QAction *actionOpen;
    QAction *actionSave;
    QAction *actionSave_As;
    QAction *actionPrint;
    QAction *actionExit;
    QAction *actionCopy;
    QAction *actionCut;
    QAction *actionPaste;
    QAction *actionUndo;
    QAction *actionRedo;
    QAction *actionSelect_Font;
    QAction *actionBold;
    QAction *actionItalic;
    QAction *actionUnderline;
    QWidget *centralwidget;
    QVBoxLayout *verticalLayout;
    QTextEdit *textEdit;
    QMenuBar *menubar;
    QMenu *menuNew;
    QMenu *menuOpen;
    QMenu *menuSave;
    QMenu *menuSave_As;
    QMenu *menuPrint;
    QMenu *menuExit;
    QMenu *menuCopy;
    QMenu *menuCut;
    QMenu *menuPaste;
    QMenu *menuUndo;
    QMenu *menuRedo;
    QMenu *menuSelect_Font;
    QMenu *menuBold;
    QMenu *menuItalic;
    QMenu *menuUnderline;
    QStatusBar *statusbar;

    void setupUi(QMainWindow *Notepad)
    {
        if (Notepad->objectName().isEmpty())
            Notepad->setObjectName(QString::fromUtf8("Notepad"));
        Notepad->resize(800, 400);
        actionNew = new QAction(Notepad);
        actionNew->setObjectName(QString::fromUtf8("actionNew"));
        actionOpen = new QAction(Notepad);
        actionOpen->setObjectName(QString::fromUtf8("actionOpen"));
        actionSave = new QAction(Notepad);
        actionSave->setObjectName(QString::fromUtf8("actionSave"));
        actionSave_As = new QAction(Notepad);
        actionSave_As->setObjectName(QString::fromUtf8("actionSave_As"));
        actionPrint = new QAction(Notepad);
        actionPrint->setObjectName(QString::fromUtf8("actionPrint"));
        actionExit = new QAction(Notepad);
        actionExit->setObjectName(QString::fromUtf8("actionExit"));
        actionCopy = new QAction(Notepad);
        actionCopy->setObjectName(QString::fromUtf8("actionCopy"));
        actionCut = new QAction(Notepad);
        actionCut->setObjectName(QString::fromUtf8("actionCut"));
        actionPaste = new QAction(Notepad);
        actionPaste->setObjectName(QString::fromUtf8("actionPaste"));
        actionUndo = new QAction(Notepad);
        actionUndo->setObjectName(QString::fromUtf8("actionUndo"));
        actionRedo = new QAction(Notepad);
        actionRedo->setObjectName(QString::fromUtf8("actionRedo"));
        actionSelect_Font = new QAction(Notepad);
        actionSelect_Font->setObjectName(QString::fromUtf8("actionSelect_Font"));
        actionBold = new QAction(Notepad);
        actionBold->setObjectName(QString::fromUtf8("actionBold"));
        actionItalic = new QAction(Notepad);
        actionItalic->setObjectName(QString::fromUtf8("actionItalic"));
        actionUnderline = new QAction(Notepad);
        actionUnderline->setObjectName(QString::fromUtf8("actionUnderline"));
        centralwidget = new QWidget(Notepad);
        centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
        verticalLayout = new QVBoxLayout(centralwidget);
        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
        textEdit = new QTextEdit(centralwidget);
        textEdit->setObjectName(QString::fromUtf8("textEdit"));

        verticalLayout->addWidget(textEdit);

        Notepad->setCentralWidget(centralwidget);
        menubar = new QMenuBar(Notepad);
        menubar->setObjectName(QString::fromUtf8("menubar"));
        menubar->setGeometry(QRect(0, 0, 800, 21));
        menuNew = new QMenu(menubar);
        menuNew->setObjectName(QString::fromUtf8("menuNew"));
        menuOpen = new QMenu(menubar);
        menuOpen->setObjectName(QString::fromUtf8("menuOpen"));
        menuSave = new QMenu(menubar);
        menuSave->setObjectName(QString::fromUtf8("menuSave"));
        menuSave_As = new QMenu(menubar);
        menuSave_As->setObjectName(QString::fromUtf8("menuSave_As"));
        menuPrint = new QMenu(menubar);
        menuPrint->setObjectName(QString::fromUtf8("menuPrint"));
        menuExit = new QMenu(menubar);
        menuExit->setObjectName(QString::fromUtf8("menuExit"));
        menuCopy = new QMenu(menubar);
        menuCopy->setObjectName(QString::fromUtf8("menuCopy"));
        menuCut = new QMenu(menubar);
        menuCut->setObjectName(QString::fromUtf8("menuCut"));
        menuPaste = new QMenu(menubar);
        menuPaste->setObjectName(QString::fromUtf8("menuPaste"));
        menuUndo = new QMenu(menubar);
        menuUndo->setObjectName(QString::fromUtf8("menuUndo"));
        menuRedo = new QMenu(menubar);
        menuRedo->setObjectName(QString::fromUtf8("menuRedo"));
        menuSelect_Font = new QMenu(menubar);
        menuSelect_Font->setObjectName(QString::fromUtf8("menuSelect_Font"));
        menuBold = new QMenu(menubar);
        menuBold->setObjectName(QString::fromUtf8("menuBold"));
        menuItalic = new QMenu(menubar);
        menuItalic->setObjectName(QString::fromUtf8("menuItalic"));
        menuUnderline = new QMenu(menubar);
        menuUnderline->setObjectName(QString::fromUtf8("menuUnderline"));
        Notepad->setMenuBar(menubar);
        statusbar = new QStatusBar(Notepad);
        statusbar->setObjectName(QString::fromUtf8("statusbar"));
        Notepad->setStatusBar(statusbar);

        menubar->addAction(menuNew->menuAction());
        menubar->addAction(menuOpen->menuAction());
        menubar->addAction(menuSave->menuAction());
        menubar->addAction(menuSave_As->menuAction());
        menubar->addAction(menuPrint->menuAction());
        menubar->addAction(menuExit->menuAction());
        menubar->addAction(menuCopy->menuAction());
        menubar->addAction(menuCut->menuAction());
        menubar->addAction(menuPaste->menuAction());
        menubar->addAction(menuUndo->menuAction());
        menubar->addAction(menuRedo->menuAction());
        menubar->addAction(menuSelect_Font->menuAction());
        menubar->addAction(menuBold->menuAction());
        menubar->addAction(menuItalic->menuAction());
        menubar->addAction(menuUnderline->menuAction());
        menuNew->addAction(actionNew);
        menuOpen->addAction(actionOpen);
        menuSave->addAction(actionSave);
        menuSave_As->addAction(actionSave_As);
        menuPrint->addAction(actionPrint);
        menuExit->addAction(actionExit);
        menuCopy->addAction(actionCopy);
        menuCut->addAction(actionCut);
        menuPaste->addAction(actionPaste);
        menuUndo->addAction(actionUndo);
        menuRedo->addAction(actionRedo);
        menuSelect_Font->addAction(actionSelect_Font);
        menuBold->addAction(actionBold);
        menuItalic->addAction(actionItalic);
        menuUnderline->addAction(actionUnderline);

        retranslateUi(Notepad);

        QMetaObject::connectSlotsByName(Notepad);
    } // setupUi

    void retranslateUi(QMainWindow *Notepad)
    {
        Notepad->setWindowTitle(QCoreApplication::translate("Notepad", "Notepad", nullptr));
        actionNew->setText(QCoreApplication::translate("Notepad", "New", nullptr));
        actionOpen->setText(QCoreApplication::translate("Notepad", "Open", nullptr));
        actionSave->setText(QCoreApplication::translate("Notepad", "Save", nullptr));
        actionSave_As->setText(QCoreApplication::translate("Notepad", "Save As", nullptr));
        actionPrint->setText(QCoreApplication::translate("Notepad", "Print", nullptr));
        actionExit->setText(QCoreApplication::translate("Notepad", "Exit", nullptr));
        actionCopy->setText(QCoreApplication::translate("Notepad", "Copy", nullptr));
        actionCut->setText(QCoreApplication::translate("Notepad", "Cut", nullptr));
        actionPaste->setText(QCoreApplication::translate("Notepad", "Paste", nullptr));
        actionUndo->setText(QCoreApplication::translate("Notepad", "Undo", nullptr));
        actionRedo->setText(QCoreApplication::translate("Notepad", "Redo", nullptr));
        actionSelect_Font->setText(QCoreApplication::translate("Notepad", "Select Font", nullptr));
        actionBold->setText(QCoreApplication::translate("Notepad", "Bold", nullptr));
        actionItalic->setText(QCoreApplication::translate("Notepad", "Italic", nullptr));
        actionUnderline->setText(QCoreApplication::translate("Notepad", "Underline", nullptr));
        menuNew->setTitle(QCoreApplication::translate("Notepad", "New", nullptr));
        menuOpen->setTitle(QCoreApplication::translate("Notepad", "Open", nullptr));
        menuSave->setTitle(QCoreApplication::translate("Notepad", "Save", nullptr));
        menuSave_As->setTitle(QCoreApplication::translate("Notepad", "Save As", nullptr));
        menuPrint->setTitle(QCoreApplication::translate("Notepad", "Print", nullptr));
        menuExit->setTitle(QCoreApplication::translate("Notepad", "Exit", nullptr));
        menuCopy->setTitle(QCoreApplication::translate("Notepad", "Copy", nullptr));
        menuCut->setTitle(QCoreApplication::translate("Notepad", "Cut", nullptr));
        menuPaste->setTitle(QCoreApplication::translate("Notepad", "Paste", nullptr));
        menuUndo->setTitle(QCoreApplication::translate("Notepad", "Undo", nullptr));
        menuRedo->setTitle(QCoreApplication::translate("Notepad", "Redo", nullptr));
        menuSelect_Font->setTitle(QCoreApplication::translate("Notepad", "Select Font", nullptr));
        menuBold->setTitle(QCoreApplication::translate("Notepad", "Bold", nullptr));
        menuItalic->setTitle(QCoreApplication::translate("Notepad", "Italic", nullptr));
        menuUnderline->setTitle(QCoreApplication::translate("Notepad", "Underline", nullptr));
    } // retranslateUi

};

namespace Ui {
    class Notepad: public Ui_Notepad {};
} // namespace Ui

QT_END_NAMESPACE

#endif // UI_NOTEPAD_H

Please help. Thanks in advance.

DragonOsman avatar Oct 11 '19 13:10 DragonOsman

Update: I read that I had to run qmake and then nmake on Windows to build a Qt app, also for Wasm builds, so I tried that. But because I'm using the LLVM Wasm backend, I got this error:

shared:ERROR: BINARYEN_TRAP_MODE is not supported by the LLVM wasm backend
NMAKE : fatal error U1077: 'C:\emsdk\upstream\emscripten\em++.BAT' : return code '0x1'
Stop.

Full output:

C:\Qt\5.13.1\wasm_32\bin\uic.exe notepad.ui -o ui_notepad.h
        em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o main.obj main.cpp
        em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o notepad.obj notepad.cpp
        em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o notepad.js_plugin_import.obj E:/programming/Qt/notepad-project/notepad.js_plugin_import.cpp
        em++ -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -dM -E -o moc_predefs.h C:\Qt\5.13.1\wasm_32\mkspecs\features\data\dummy.cpp
        C:\Qt\5.13.1\wasm_32\bin\moc.exe -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include E:/programming/Qt/notepad-project/moc_predefs.h -IC:/Qt/5.13.1/wasm_32/mkspecs/wasm-emscripten -IE:/programming/Qt/notepad-project -IC:/Qt/5.13.1/wasm_32/include -IC:/Qt/5.13.1/wasm_32/include/QtPrintSupport -IC:/Qt/5.13.1/wasm_32/include/QtWidgets -IC:/Qt/5.13.1/wasm_32/include/QtGui -IC:/Qt/5.13.1/wasm_32/include/QtCore notepad.h -o moc_notepad.cpp
        em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o moc_notepad.obj moc_notepad.cpp
        sed -e s/@APPNAME@/notepad/g C:/Qt/5.13.1/wasm_32/plugins/platforms/wasm_shell.html > E:/programming/Qt/notepad-project/notepad.html
        copy /y C:\Qt\5.13.1\wasm_32\plugins\platforms\qtloader.js E:\programming\Qt\notepad-project
        1 file(s) copied.
        copy /y C:\Qt\5.13.1\wasm_32\plugins\platforms\qtlogo.svg E:\programming\Qt\notepad-project
        1 file(s) copied.
        em++ -s WASM=1 -s FULL_ES2=1 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 --bind -s "BINARYEN_TRAP_MODE='clamp'" -O3 -s ALLOW_MEMORY_GROWTH=1 -o notepad.js main.obj  notepad.obj  notepad.js_plugin_import.obj  moc_notepad.obj   C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a
shared:ERROR: BINARYEN_TRAP_MODE is not supported by the LLVM wasm backend
NMAKE : fatal error U1077: 'C:\emsdk\upstream\emscripten\em++.BAT' : return code '0x1'
Stop.

How do I fix this? Thanks.

Edit for update: I just tried taking out the BINARYEN_TRAP_MODE part and replacing it with EXPORT_ALL=1 but that also gave errors. Just removing it without replacing it with anything also had the same result.

DragonOsman avatar Oct 14 '19 00:10 DragonOsman

Calling the qmake program by default creates this Makefile: https://gist.github.com/DragonOsman/52618d0cea47871244d62f17a02a042a . How should I edit it to make it work with the Wasm backend?

DragonOsman avatar Oct 14 '19 08:10 DragonOsman

Can you post the error you get when removing BINARYEN_TRAP_MODE?

Where is BINARYEN_TRAP_MODE coming from? Is it part of the Qt build system or your project?

Do the Qt examples build for you? Perhaps file a bug with Qt if nothing is working for you?

sbc100 avatar Oct 14 '19 16:10 sbc100

I posted the Makefile above. It's generated by the qmake program. That Makefile is what's giving the BINARYEN_TRAP_MODE option.

The error I get for it is just:

shared:ERROR: BINARYEN_TRAP_MODE is not supported by the LLVM wasm backend
NMAKE : fatal error U1077: 'C:\emsdk\upstream\emscripten\em++.BAT' : return code '0x1'
Stop.

The Makefile again: https://gist.github.com/DragonOsman/52618d0cea47871244d62f17a02a042a

DragonOsman avatar Oct 14 '19 17:10 DragonOsman

I meant, after removing BINARYEN_TRAP_MODE what error do you get?

The fact that BINARYEN_TRAP_MODE is in the generated Makefile is probably something that needs to be fixed upstream in Qt.

sbc100 avatar Oct 14 '19 18:10 sbc100

I'm trying right now. I gave the command to redirect the output to a file. But it's taking a really long time. I'll get back to you when it's done.

DragonOsman avatar Oct 15 '19 11:10 DragonOsman

Okay, it was taking too long so I had to kill it. Too many errors. All I can say is that there were a whole bunch of exceptions from Python. I think you should try to reproduce it on your end. On Windows it requires Qt version 5.13.1, nmake, sed and MinGW. Make a Qt app and try to compile it to Wasm using the Wasm backend using the Makefile generated by qmake as is.

They have this patch that can be applied but I don't know how to apply it: https://codereview.qt-project.org/c/qt/qtbase/+/266814/2/mkspecs/wasm-emscripten/qmake.conf .

DragonOsman avatar Oct 16 '19 19:10 DragonOsman

Even after taking out the line in the qmake.conf file for clamp mode and adding the patch, I still get those errors. Note: This is one part of the stream of errors:

error: unknown warning option '-Wno-int-in-bool-context'; did you mean '-Wno-gnu-include-next'?
      [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wno-int-in-bool-context'; did you mean '-Wno-gnu-include-next'?
      [-Werror,-Wunknown-warning-option]
shared:ERROR: 'C:/emsdk/upstream/bin\clang.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=38 -D__EMSCRIPTEN_tiny__=46 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -Wno-int-in-bool-context -c -Werror -Os -fno-builtin -Wno-return-type -Wno-parentheses -Wno-ignored-attributes -Wno-shift-count-overflow -Wno-shift-negative-value -Wno-dangling-else -Wno-unknown-pragmas -Wno-shift-op-parentheses -Wno-string-plus-int -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses -Wno-visibility -Wno-pointer-sign -Wno-absolute-value -Wno-empty-body -Wno-int-in-bool-context -IC:\emsdk\upstream\emscripten\system\lib\libc\musl\src\internal -IC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\js -DEMSCRIPTEN C:\emsdk\upstream\emscripten\system\lib\libc\musl\src\stdlib\qsort.c -fno-inline-functions -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp_bduibeac\qsort.c.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)

I'm getting a huge, seemingly endless stream of errors that looks like that. This is the same as what's been happening since before.

DragonOsman avatar Oct 17 '19 11:10 DragonOsman

Here's a link to a log file (I finally managed to get it).

DragonOsman avatar Oct 17 '19 11:10 DragonOsman

It looks like the version of emcc you are running and the version of clang do not match.

What version of emsdk are you using? Are you sure the version emcc you are using comes from emsdk? What does emcc --version tell you?

If you are using 1.38.47 or 1.38.48 then -Wno-int-in-bool-context should no longer be passed to clang. See #9508

sbc100 avatar Oct 17 '19 16:10 sbc100

Emscripten version is 1.38.46. The version of Clang I have is version 10.0.0. Do I need to clone it again to get the latest version? I'll try installing the latest-upstream package again and see if that helps.

And yes, I'm sure the emcc I'm using comes from emsdk.

DragonOsman avatar Oct 17 '19 21:10 DragonOsman

Are you building llvm yourself? If you are using emsdk you shouldn't need to do that since it ships with prebuilt, known-good, llvm versions.

If you are building it yourself then yes you do need to keep you llvm version to to date.

sbc100 avatar Oct 17 '19 22:10 sbc100

No, I didn't build LLVM myself. I'm using the version 10 that comes with the sdk when you run emsdk install latest-upstream.

I now have version 1.38.48 of Emscripten, but there's another problem now:

wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: qprinter.obj: machine type must be wasm32
wasm-ld: error: qprintdialog_unix.obj: machine type must be wasm32
wasm-ld: error: qaction.obj: machine type must be wasm32
wasm-ld: error: qapplication.obj: machine type must be wasm32
wasm-ld: error: qboxlayout.obj: machine type must be wasm32
wasm-ld: error: qwidget.obj: machine type must be wasm32
wasm-ld: error: qmainwindow.obj: machine type must be wasm32
wasm-ld: error: qmenu.obj: machine type must be wasm32
wasm-ld: error: qmenubar.obj: machine type must be wasm32
wasm-ld: error: qstatusbar.obj: machine type must be wasm32
wasm-ld: error: qtextedit.obj: machine type must be wasm32

I did it in a Developer Command Prompt with x64 mode on first so I thought switching to x86 might help, but that gave me the same error too. Any idea how I could fix this?

DragonOsman avatar Oct 17 '19 22:10 DragonOsman

This means those object file most likely were not compiled with ./emcc or if they were an alternative --target argument might have been given when they were compiled.

You can use file main.obj to find out the file type of a given object.

It would also help if you could post the command line that was use to build one of the objects?

sbc100 avatar Oct 17 '19 23:10 sbc100

I was told to use mingw32-make, but when I tried that I got pretty much the same result: https://gist.github.com/DragonOsman/4b5a04e0546d3ccc21c67cc978510e70 .

DragonOsman avatar Oct 18 '19 10:10 DragonOsman

Something very strange is going on here. It looks like you are correctly compiling main.obj with em++:

em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o main.obj main.cpp

But then wasm-ld is complaining that it doesn't have the correct machine type:

em++ -s WASM=1 -s FULL_ES2=1 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 --bind -O3 -... wasm-ld: error: main.obj: machine type must be wasm32

This suggests to me that main.obj is a bit code file but its a bitcode file for the wrong machine.

Can you run llvm-dis on main.obj and see what target triple is contained within it?

Secondly, if you are using upstream llvm main.obj should not be a bitcode file at all. Can you run the compile command for main.obj with EMCC_DEBUG so we can see what is going on.

Finally, are you able to compile a simple hello world with your setup?

sbc100 avatar Oct 18 '19 17:10 sbc100

It seems I can't compile a simple Hello World app either:

em++ -std=c++17 -Wall -pedantic -pedantic-errors -s WASM=1 main.cpp -o main.html
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: JAVA not defined in C:/Users/Osman/.emscripten, using "java"
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -std=c++17 -Wall -pedantic -pedantic-errors -s WASM=1 main.cpp -o main.html --emscripten-cxx  (in C:\Users\Osman\Desktop)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed java -version
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.39 seconds
cache:DEBUG: PID 10492 acquiring multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
cache:DEBUG: done
emcc:DEBUG: compiling source file: main.cpp
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=38 -D__EMSCRIPTEN_tiny__=48 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -std=c++17 -Wall -pedantic -pedantic-errors -DEMSCRIPTEN main.cpp -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\main_0.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 1.41 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Users\Osman\AppData\Local\Temp\emscripten_temp\main_0.o
system_libs:DEBUG: including libc (libc.a)
system_libs:DEBUG: including libcompiler_rt (libcompiler_rt.a)
system_libs:DEBUG: including libc-wasm (libc-wasm.a)
system_libs:DEBUG: including libc++ (libc++-noexcept.a)
system_libs:DEBUG: including libc++abi (libc++abi-noexcept.a)
system_libs:DEBUG: including libmalloc (libdlmalloc.a)
system_libs:DEBUG: including libpthread (libpthread_stub.a)
system_libs:DEBUG: including libc_rt_wasm (libc_rt_wasm.a)
emcc:DEBUG: emcc step "calculate system libraries" took 0.11 seconds
emcc:DEBUG: linking: ['C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\main_0.o', '-LC:\\emsdk\\upstream\\emscripten\\system\\local\\lib', '-LC:\\emsdk\\upstream\\emscripten\\system\\lib', '-LC:\\Users\\Osman\\.emscripten_cache\\wasm-obj', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libcompiler_rt.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc-wasm.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc++-noexcept.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc++abi-noexcept.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libdlmalloc.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libpthread_stub.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc_rt_wasm.a']
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\wasm-ld.exe -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\main.wasm --allow-undefined --lto-O0 C:\Users\Osman\AppData\Local\Temp\emscripten_temp\main_0.o -LC:\emsdk\upstream\emscripten\system\local\lib -LC:\emsdk\upstream\emscripten\system\lib -LC:\Users\Osman\.emscripten_cache\wasm-obj C:\Users\Osman\.emscripten_cache\wasm-obj\libc.a C:\Users\Osman\.emscripten_cache\wasm-obj\libcompiler_rt.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc-wasm.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc++-noexcept.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc++abi-noexcept.a C:\Users\Osman\.emscripten_cache\wasm-obj\libdlmalloc.a C:\Users\Osman\.emscripten_cache\wasm-obj\libpthread_stub.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc_rt_wasm.a --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location --export fflush --export _ZSt18uncaught_exceptionv -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024
emcc:DEBUG: emcc step "link" took 0.08 seconds
emcc:DEBUG: LLVM => JS
cache:INFO: generating system asset: generated_struct_info.json... (this will be cached in "C:\Users\Osman\.emscripten_cache\wasm-obj\generated_struct_info.json" for subsequent builds)
gen_struct_info: Generating C code... C:\Users\Osman\AppData\Local\Temp\tmpzlm1nr2b.c
gen_struct_info: Compiling generated code...
gen_struct_info: ['C:\\Users\\Osman\\AppData\\Local\\Programs\\Python\\Python37\\python.exe', 'C:\\emsdk\\upstream\\emscripten\\emcc.py', '-D_GNU_SOURCE', '-s', 'BINARYEN=1', '-o', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\tmpg8dqsah0.js', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\tmpzlm1nr2b.c', '-s', 'BOOTSTRAPPING_STRUCT_INFO=1', '-s', 'WARN_ON_UNDEFINED_SYMBOLS=0', '-O0', '--js-opts', '0', '--memory-init-file', '0', '-s', 'SINGLE_FILE=1', '-Wno-format']
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: JAVA not defined in C:/Users/Osman/.emscripten, using "java"
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -D_GNU_SOURCE -s BINARYEN=1 -o C:\Users\Osman\AppData\Local\Temp\tmpg8dqsah0.js C:\Users\Osman\AppData\Local\Temp\tmpzlm1nr2b.c -s BOOTSTRAPPING_STRUCT_INFO=1 -s WARN_ON_UNDEFINED_SYMBOLS=0 -O0 --js-opts 0 --memory-init-file 0 -s SINGLE_FILE=1 -Wno-format  (in C:\Users\Osman\Desktop)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed java -version
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.83 seconds
emcc:DEBUG: compiling source file: C:\Users\Osman\AppData\Local\Temp\tmpzlm1nr2b.c
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=38 -D__EMSCRIPTEN_tiny__=48 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -D_GNU_SOURCE -O0 -Wno-format -DEMSCRIPTEN C:\Users\Osman\AppData\Local\Temp\tmpzlm1nr2b.c -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\tmpzlm1nr2b_0.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 0.76 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: emcc step "calculate system libraries" took 0.00 seconds
emcc:DEBUG: linking: ['C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\tmpzlm1nr2b_0.o', '-LC:\\emsdk\\upstream\\emscripten\\system\\local\\lib', '-LC:\\emsdk\\upstream\\emscripten\\system\\lib', '-LC:\\Users\\Osman\\.emscripten_cache\\wasm-obj']
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\wasm-ld.exe -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\tmpg8dqsah0.wasm --allow-undefined --lto-O0 C:\Users\Osman\AppData\Local\Temp\emscripten_temp\tmpzlm1nr2b_0.o -LC:\emsdk\upstream\emscripten\system\local\lib -LC:\emsdk\upstream\emscripten\system\lib -LC:\Users\Osman\.emscripten_cache\wasm-obj --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location --export fflush -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024
emcc:DEBUG: emcc step "link" took 0.04 seconds
emcc:DEBUG: LLVM => JS
shared:ERROR: 'C:/emsdk/upstream\bin\wasm-dis C:\Users\Osman\AppData\Local\Temp\emscripten_temp\tmpg8dqsah0.wasm -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\base.wasm.wast' failed: [WinError 193] %1 is not a valid Win32 application
FAIL: Compilation failed!
cache:DEBUG: PID 10492 released multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj

I think main.obj for the Notepad is compiled to bitcode because the -mllvm flag is passed to it.

Here's the output for when I tried to build the Notepad project again, with the EMCC_DEBUG flag set to 1:

Microsoft (R) Program Maintenance Utility Version 14.23.28106.4
Copyright (C) Microsoft Corporation.  All rights reserved.

        sed -e s/@APPNAME@/notepad/g C:/Qt/5.13.1/wasm_32/plugins/platforms/wasm_shell.html > E:/programming/Qt/notepad-project/notepad.html
        copy /y C:\Qt\5.13.1\wasm_32\plugins\platforms\qtloader.js E:\programming\Qt\notepad-project
        1 file(s) copied.
        copy /y C:\Qt\5.13.1\wasm_32\plugins\platforms\qtlogo.svg E:\programming\Qt\notepad-project
        1 file(s) copied.
        em++ -s WASM=1 -s FULL_ES2=1 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 --bind -O3 -s ALLOW_MEMORY_GROWTH=1 -o notepad.js main.obj  notepad.obj  notepad.js_plugin_import.obj  moc_notepad.obj   C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: JAVA not defined in C:/Users/Osman/.emscripten, using "java"
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -s WASM=1 -s FULL_ES2=1 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 --bind -O3 -s ALLOW_MEMORY_GROWTH=1 -o notepad.js main.obj notepad.obj notepad.js_plugin_import.obj moc_notepad.obj C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a --emscripten-cxx  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed java -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.87 seconds
cache:DEBUG: PID 10436 acquiring multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
cache:DEBUG: done
emcc:DEBUG: using object file: main.obj
emcc:DEBUG: using object file: notepad.obj
emcc:DEBUG: using object file: notepad.js_plugin_import.obj
emcc:DEBUG: using object file: moc_notepad.obj
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a
emcc:DEBUG: emcc step "compile inputs" took 0.03 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe E:\programming\Qt\notepad-project\main.obj
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe E:\programming\Qt\notepad-project\notepad.obj
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe E:\programming\Qt\notepad-project\notepad.js_plugin_import.obj
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe E:\programming\Qt\notepad-project\moc_notepad.obj
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\platforms\libqwasm.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5EventDispatcherSupport.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5FontDatabaseSupport.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libqtfreetype.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5EglSupport.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqgif.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqicns.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqico.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqjpeg.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqtga.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqtiff.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqwbmp.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqwebp.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5PrintSupport.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5Widgets.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5Gui.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libqtlibpng.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libqtharfbuzz.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5Core.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libqtpcre2.a
system_libs:DEBUG: forcing stdlibs: {'libembind'}
system_libs:DEBUG: including libc (libc.a)
system_libs:DEBUG: including libcompiler_rt (libcompiler_rt.a)
system_libs:DEBUG: including libc-wasm (libc-wasm.a)
system_libs:DEBUG: including libc++ (libc++-noexcept.a)
system_libs:DEBUG: including libc++abi (libc++abi-noexcept.a)
system_libs:DEBUG: including libembind (libembind-rtti.a)
system_libs:DEBUG: including libgl (libgl-webgl2.a)
system_libs:DEBUG: including libmalloc (libdlmalloc.a)
system_libs:DEBUG: including libpthread (libpthread_stub.a)
system_libs:DEBUG: including libc_rt_wasm (libc_rt_wasm.a)
emcc:DEBUG: emcc step "calculate system libraries" took 6.14 seconds
emcc:DEBUG: linking: ['main.obj', 'notepad.obj', '-LC:\\emsdk\\upstream\\emscripten\\system\\local\\lib', 'notepad.js_plugin_import.obj', '-LC:\\emsdk\\upstream\\emscripten\\system\\lib', 'moc_notepad.obj', '-LC:\\Users\\Osman\\.emscripten_cache\\wasm-obj', 'C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a', 'C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a', 'C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a', 'C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a', 'C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libcompiler_rt.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc-wasm.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc++-noexcept.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc++abi-noexcept.a', '--whole-archive', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libembind-rtti.a', '--no-whole-archive', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libgl-webgl2.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libdlmalloc.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libpthread_stub.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc_rt_wasm.a']
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: qprinter.obj: machine type must be wasm32
wasm-ld: error: qprintdialog_unix.obj: machine type must be wasm32
wasm-ld: error: qaction.obj: machine type must be wasm32
wasm-ld: error: qapplication.obj: machine type must be wasm32
wasm-ld: error: qboxlayout.obj: machine type must be wasm32
wasm-ld: error: qwidget.obj: machine type must be wasm32
wasm-ld: error: qmainwindow.obj: machine type must be wasm32
wasm-ld: error: qmenu.obj: machine type must be wasm32
wasm-ld: error: qmenubar.obj: machine type must be wasm32
wasm-ld: error: qstatusbar.obj: machine type must be wasm32
wasm-ld: error: qtextedit.obj: machine type must be wasm32
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
shared:ERROR: 'C:/emsdk/upstream/bin\wasm-ld.exe -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\notepad.wasm --allow-undefined --lto-O0 main.obj notepad.obj -LC:\emsdk\upstream\emscripten\system\local\lib notepad.js_plugin_import.obj -LC:\emsdk\upstream\emscripten\system\lib moc_notepad.obj -LC:\Users\Osman\.emscripten_cache\wasm-obj C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc.a C:\Users\Osman\.emscripten_cache\wasm-obj\libcompiler_rt.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc-wasm.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc++-noexcept.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc++abi-noexcept.a --whole-archive C:\Users\Osman\.emscripten_cache\wasm-obj\libembind-rtti.a --no-whole-archive C:\Users\Osman\.emscripten_cache\wasm-obj\libgl-webgl2.a C:\Users\Osman\.emscripten_cache\wasm-obj\libdlmalloc.a C:\Users\Osman\.emscripten_cache\wasm-obj\libpthread_stub.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc_rt_wasm.a --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location --export fflush --export emscripten_GetProcAddress --export strstr --export emscripten_webgl_make_context_current --export emscripten_webgl_get_current_context --export emscripten_builtin_free --export _get_environ --export emscripten_builtin_memalign --export memalign --export realloc --export _ZSt18uncaught_exceptionv --export __cxa_find_matching_catch --export __cxa_is_pointer_type --export __cxa_can_catch --export strlen --export _get_tzname --export _get_daylight --export _get_timezone -z stack-size=5242880 --initial-memory=16777216 --no-entry --global-base=1024' failed (1)
cache:DEBUG: PID 10436 released multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
NMAKE : fatal error U1077: 'C:\emsdk\upstream\emscripten\em++.BAT' : return code '0x1'
Stop.

All I did was clone and update emsdk and install latest-upstream. I don't think I did anything I shouldn't have. But maybe something went wrong somewhere somehow. I hope I can find a way to fix this.

DragonOsman avatar Oct 19 '19 15:10 DragonOsman

For building a simple hello world it looks like the problem is 'C:/emsdk/upstream\bin\wasm-dis ... [WinError 193] %1 is not a valid Win32 application`.

Can you run C:/emsdk/upstream\bin\wasm-dis from the command line?

For the Qt app I'd like to see the EMCC_DEBUG output of how main.obj is build. (You could delete that file and rebuild in order to get this output?). Maybe also attach main.obj so I can see what kind of bitcode file it is?

sbc100 avatar Oct 19 '19 17:10 sbc100

I was able to build the Hello World code to Wasm after deleting and re-cloning the Emsdk, making sure the tags were updated, and then installing and activating the latest upstream stuff. But I still can't build the Qt app to Wasm. Same wasm-ld.exe error as before. I deleted all of the stuff generated by running qmake and nmake and did all of it again. So I can give you the output now.

nmake

Microsoft (R) Program Maintenance Utility Version 14.23.28106.4
Copyright (C) Microsoft Corporation.  All rights reserved.

        em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o main.obj main.cpp
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o main.obj main.cpp --emscripten-cxx  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.35 seconds
cache:DEBUG: PID 8972 acquiring multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
cache:DEBUG: done
emcc:DEBUG: compiling source file: main.cpp
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -c -O3 -std=gnu++1z -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -DEMSCRIPTEN main.cpp -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o main.obj -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 4.30 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: stopping after compile phase
cache:DEBUG: PID 8972 released multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
        em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o notepad.obj notepad.cpp
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o notepad.obj notepad.cpp --emscripten-cxx  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.83 seconds
cache:DEBUG: PID 9968 acquiring multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
cache:DEBUG: done
emcc:DEBUG: compiling source file: notepad.cpp
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -c -O3 -std=gnu++1z -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -DEMSCRIPTEN notepad.cpp -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o notepad.obj -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 5.59 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: stopping after compile phase
cache:DEBUG: PID 9968 released multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
        em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o notepad.js_plugin_import.obj E:/programming/Qt/notepad-project/notepad.js_plugin_import.cpp
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o notepad.js_plugin_import.obj E:/programming/Qt/notepad-project/notepad.js_plugin_import.cpp --emscripten-cxx  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.35 seconds
cache:DEBUG: PID 11364 acquiring multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
cache:DEBUG: done
emcc:DEBUG: compiling source file: E:/programming/Qt/notepad-project/notepad.js_plugin_import.cpp
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -c -O3 -std=gnu++1z -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -DEMSCRIPTEN E:/programming/Qt/notepad-project/notepad.js_plugin_import.cpp -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o notepad.js_plugin_import.obj -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 3.06 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: stopping after compile phase
cache:DEBUG: PID 11364 released multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
        em++ -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -dM -E -o moc_predefs.h C:\Qt\5.13.1\wasm_32\mkspecs\features\data\dummy.cpp
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -dM -E -o moc_predefs.h C:\Qt\5.13.1\wasm_32\mkspecs\features\data\dummy.cpp --emscripten-cxx  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.43 seconds
cache:DEBUG: PID 15504 acquiring multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
cache:DEBUG: done
emcc:DEBUG: just preprocessor C:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -O3 -std=gnu++1z -Wall -W -dM -E -DEMSCRIPTEN C:\Qt\5.13.1\wasm_32\mkspecs\features\data\dummy.cpp -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -o moc_predefs.h
shared:DEBUG: executed C:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -O3 -std=gnu++1z -Wall -W -dM -E -DEMSCRIPTEN C:\Qt\5.13.1\wasm_32\mkspecs\features\data\dummy.cpp -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -o moc_predefs.h
cache:DEBUG: PID 15504 released multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
        C:\Qt\5.13.1\wasm_32\bin\moc.exe -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include E:/programming/Qt/notepad-project/moc_predefs.h -IC:/Qt/5.13.1/wasm_32/mkspecs/wasm-emscripten -IE:/programming/Qt/notepad-project -IC:/Qt/5.13.1/wasm_32/include -IC:/Qt/5.13.1/wasm_32/include/QtPrintSupport -IC:/Qt/5.13.1/wasm_32/include/QtWidgets -IC:/Qt/5.13.1/wasm_32/include/QtGui -IC:/Qt/5.13.1/wasm_32/include/QtCore notepad.h -o moc_notepad.cpp
        em++ -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o moc_notepad.obj moc_notepad.cpp
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -c -O3 -std=gnu++1z -s ALLOW_MEMORY_GROWTH=1 -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -o moc_notepad.obj moc_notepad.cpp --emscripten-cxx  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.38 seconds
cache:DEBUG: PID 3552 acquiring multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
cache:DEBUG: done
emcc:DEBUG: compiling source file: moc_notepad.cpp
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -c -O3 -std=gnu++1z -Wall -W -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\5.13.1\wasm_32\include -IC:\Qt\5.13.1\wasm_32\include\QtPrintSupport -IC:\Qt\5.13.1\wasm_32\include\QtWidgets -IC:\Qt\5.13.1\wasm_32\include\QtGui -IC:\Qt\5.13.1\wasm_32\include\QtCore -I. -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.13.1\wasm_32\mkspecs\wasm-emscripten -DEMSCRIPTEN moc_notepad.cpp -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o moc_notepad.obj -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 3.15 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: stopping after compile phase
cache:DEBUG: PID 3552 released multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
        sed -e s/@APPNAME@/notepad/g C:/Qt/5.13.1/wasm_32/plugins/platforms/wasm_shell.html > E:/programming/Qt/notepad-project/notepad.html
        copy /y C:\Qt\5.13.1\wasm_32\plugins\platforms\qtloader.js E:\programming\Qt\notepad-project
        1 file(s) copied.
        copy /y C:\Qt\5.13.1\wasm_32\plugins\platforms\qtlogo.svg E:\programming\Qt\notepad-project
        1 file(s) copied.
        em++ -s WASM=1 -s FULL_ES2=1 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 --bind -O3 -s ALLOW_MEMORY_GROWTH=1 -o notepad.js main.obj  notepad.obj  notepad.js_plugin_import.obj  moc_notepad.obj   C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -s WASM=1 -s FULL_ES2=1 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 --bind -O3 -s ALLOW_MEMORY_GROWTH=1 -o notepad.js main.obj notepad.obj notepad.js_plugin_import.obj moc_notepad.obj C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a --emscripten-cxx  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 1.71 seconds
cache:DEBUG: PID 16392 acquiring multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
cache:DEBUG: done
emcc:DEBUG: using object file: main.obj
emcc:DEBUG: using object file: notepad.obj
emcc:DEBUG: using object file: notepad.js_plugin_import.obj
emcc:DEBUG: using object file: moc_notepad.obj
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a
emcc:DEBUG: using library file: C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a
emcc:DEBUG: emcc step "compile inputs" took 0.05 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe E:\programming\Qt\notepad-project\main.obj
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe E:\programming\Qt\notepad-project\notepad.obj
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe E:\programming\Qt\notepad-project\notepad.js_plugin_import.obj
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe E:\programming\Qt\notepad-project\moc_notepad.obj
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\platforms\libqwasm.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5EventDispatcherSupport.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5FontDatabaseSupport.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libqtfreetype.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5EglSupport.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqgif.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqicns.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqico.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqjpeg.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqtga.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqtiff.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqwbmp.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\plugins\imageformats\libqwebp.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5PrintSupport.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5Widgets.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5Gui.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libqtlibpng.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libqtharfbuzz.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libQt5Core.a
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-nm.exe C:\Qt\5.13.1\wasm_32\lib\libqtpcre2.a
system_libs:DEBUG: forcing stdlibs: {'libembind'}
system_libs:DEBUG: including libc (libc.a)
system_libs:DEBUG: including libcompiler_rt (libcompiler_rt.a)
system_libs:DEBUG: including libc-wasm (libc-wasm.a)
system_libs:DEBUG: including libc++ (libc++-noexcept.a)
system_libs:DEBUG: including libc++abi (libc++abi-noexcept.a)
system_libs:DEBUG: including libembind (libembind-rtti.a)
cache:INFO: generating system library: libembind-rtti.a... (this will be cached in "C:\Users\Osman\.emscripten_cache\wasm-obj\libembind-rtti.a" for subsequent builds)
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -c C:\emsdk\upstream\emscripten\system\lib\embind\bind.cpp -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\bind.cpp.o -Werror -std=c++11 --emscripten-cxx  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.39 seconds
emcc:DEBUG: compiling source file: C:\emsdk\upstream\emscripten\system\lib\embind\bind.cpp
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -c -Werror -std=c++11 -DEMSCRIPTEN C:\emsdk\upstream\emscripten\system\lib\embind\bind.cpp -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\bind.cpp.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 1.41 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: stopping after compile phase
shared:DEBUG: successfully executed C:\Users\Osman\AppData\Local\Programs\Python\Python38\python.exe C:\emsdk\upstream\emscripten\em++.py -c C:\emsdk\upstream\emscripten\system\lib\embind\bind.cpp -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\bind.cpp.o -Werror -std=c++11
root:WARNING: Creating response file C:\Users\Osman\AppData\Local\Temp\emscripten_0zeavqau.rsp: C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\bind.cpp.o

shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
root:WARNING: Read response file C:\Users\Osman\AppData\Local\Temp\emscripten_0zeavqau.rsp: ['C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\bind.cpp.o']
emar: ['C:\\emsdk\\upstream\\emscripten\\emar.py', 'cr', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\libembind-rtti.a', '@C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_0zeavqau.rsp']   ==>   ['C:/emsdk/upstream/bin\\llvm-ar.exe', 'cr', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\libembind-rtti.a', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\bind_bc7312e5.cpp.o']
root:WARNING: Creating response file C:\Users\Osman\AppData\Local\Temp\emscripten_temp\emscripten_8kyfithe.rsp: C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\bind_bc7312e5.cpp.o

emar: ['C:\\emsdk\\upstream\\emscripten\\emar.py', 'cr', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\libembind-rtti.a', '@C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_0zeavqau.rsp']   ==>   ['C:/emsdk/upstream/bin\\llvm-ar.exe', 'cr', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\libembind-rtti.a', '@C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\emscripten_8kyfithe.rsp']
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-ar.exe cr C:\Users\Osman\AppData\Local\Temp\emscripten_temp\libembind-rtti.a @C:\Users\Osman\AppData\Local\Temp\emscripten_temp\emscripten_8kyfithe.rsp
shared:DEBUG: successfully executed C:\Users\Osman\AppData\Local\Programs\Python\Python38\python.exe C:\emsdk\upstream\emscripten\emar.py cr C:\Users\Osman\AppData\Local\Temp\emscripten_temp\libembind-rtti.a @C:\Users\Osman\AppData\Local\Temp\emscripten_0zeavqau.rsp
cache:INFO:  - ok
system_libs:DEBUG: including libgl (libgl-webgl2.a)
cache:INFO: generating system library: libgl-webgl2.a... (this will be cached in "C:\Users\Osman\.emscripten_cache\wasm-obj\libgl-webgl2.a" for subsequent builds)
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -c C:\emsdk\upstream\emscripten\system\lib\gl\gl.c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\gl.c.o -Werror -Oz -DUSE_WEBGL2=1 -s USE_WEBGL2=1  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.38 seconds
emcc:DEBUG: compiling source file: C:\emsdk\upstream\emscripten\system\lib\gl\gl.c
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -c -Werror -Oz -DUSE_WEBGL2=1 -DEMSCRIPTEN C:\emsdk\upstream\emscripten\system\lib\gl\gl.c -fno-inline-functions -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\gl.c.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 1.22 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: stopping after compile phase
shared:DEBUG: successfully executed C:\Users\Osman\AppData\Local\Programs\Python\Python38\python.exe C:\emsdk\upstream\emscripten\emcc.py -c C:\emsdk\upstream\emscripten\system\lib\gl\gl.c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\gl.c.o -Werror -Oz -DUSE_WEBGL2=1 -s USE_WEBGL2=1
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -c C:\emsdk\upstream\emscripten\system\lib\gl\webgl1.c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\webgl1.c.o -Werror -Oz -DUSE_WEBGL2=1 -s USE_WEBGL2=1  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.43 seconds
emcc:DEBUG: compiling source file: C:\emsdk\upstream\emscripten\system\lib\gl\webgl1.c
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -c -Werror -Oz -DUSE_WEBGL2=1 -DEMSCRIPTEN C:\emsdk\upstream\emscripten\system\lib\gl\webgl1.c -fno-inline-functions -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\webgl1.c.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 0.58 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: stopping after compile phase
shared:DEBUG: successfully executed C:\Users\Osman\AppData\Local\Programs\Python\Python38\python.exe C:\emsdk\upstream\emscripten\emcc.py -c C:\emsdk\upstream\emscripten\system\lib\gl\webgl1.c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\webgl1.c.o -Werror -Oz -DUSE_WEBGL2=1 -s USE_WEBGL2=1
shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
emcc:WARNING: invocation: C:\emsdk\upstream\emscripten\emcc.py -c C:\emsdk\upstream\emscripten\system\lib\gl\webgl2.c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\webgl2.c.o -Werror -Oz -DUSE_WEBGL2=1 -s USE_WEBGL2=1  (in E:\programming\Qt\notepad-project)
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang++.exe --version
root:DEBUG: Checking JS engine ['C:/Program Files/nodejs/node.exe']
shared:DEBUG: successfully executed C:/Program Files/nodejs/node.exe --version
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\llc.exe --version
shared:INFO: (Emscripten: Running sanity checks)
shared:DEBUG: successfully executed C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe -version
emcc:DEBUG: asm.js opts not forced by user or an option that depends them, and we do not intend to run the asm.js, so disabling and leaving opts to the binaryen optimizer
emcc:DEBUG: compiling to bitcode
emcc:DEBUG: emcc step "parse arguments and setup" took 0.40 seconds
emcc:DEBUG: compiling source file: C:\emsdk\upstream\emscripten\system\lib\gl\webgl2.c
shared:DEBUG: successfully executed C:/emsdk/upstream/bin\clang.exe -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemC:\emsdk\upstream\emscripten\system\include -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemC:\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemC:\emsdk\upstream\emscripten\system\local\include -c -Werror -Oz -DUSE_WEBGL2=1 -DEMSCRIPTEN C:\emsdk\upstream\emscripten\system\lib\gl\webgl2.c -fno-inline-functions -Xclang -isystemC:\emsdk\upstream\emscripten\system\include\SDL -c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\webgl2.c.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
emcc:DEBUG: emcc step "compile inputs" took 0.33 seconds
emcc:DEBUG: emcc step "process inputs" took 0.00 seconds
emcc:DEBUG: stopping after compile phase
shared:DEBUG: successfully executed C:\Users\Osman\AppData\Local\Programs\Python\Python38\python.exe C:\emsdk\upstream\emscripten\emcc.py -c C:\emsdk\upstream\emscripten\system\lib\gl\webgl2.c -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\webgl2.c.o -Werror -Oz -DUSE_WEBGL2=1 -s USE_WEBGL2=1
root:WARNING: Creating response file C:\Users\Osman\AppData\Local\Temp\emscripten_8ti7o_as.rsp: C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\gl.c.o
C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\webgl1.c.o
C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\webgl2.c.o

shared:DEBUG: EM_CONFIG is located in C:/Users/Osman/.emscripten
shared:DEBUG: EMCC_WASM_BACKEND tells us to use wasm backend
root:WARNING: Read response file C:\Users\Osman\AppData\Local\Temp\emscripten_8ti7o_as.rsp: ['C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\gl.c.o', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\webgl1.c.o', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\webgl2.c.o']
emar: ['C:\\emsdk\\upstream\\emscripten\\emar.py', 'cr', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\libgl-webgl2.a', '@C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_8ti7o_as.rsp']   ==>   ['C:/emsdk/upstream/bin\\llvm-ar.exe', 'cr', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\libgl-webgl2.a', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\gl_a494aa11.c.o', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\webgl1_b135885b.c.o', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\webgl2_f5dfd7d7.c.o']
root:WARNING: Creating response file C:\Users\Osman\AppData\Local\Temp\emscripten_temp\emscripten_wxir3mee.rsp: C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\gl_a494aa11.c.o
C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\webgl1_b135885b.c.o
C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\webgl2_f5dfd7d7.c.o

emar: ['C:\\emsdk\\upstream\\emscripten\\emar.py', 'cr', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\libgl-webgl2.a', '@C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_8ti7o_as.rsp']   ==>   ['C:/emsdk/upstream/bin\\llvm-ar.exe', 'cr', 'C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\libgl-webgl2.a', '@C:\\Users\\Osman\\AppData\\Local\\Temp\\emscripten_temp\\emscripten_wxir3mee.rsp']
shared:DEBUG: executed C:/emsdk/upstream/bin\llvm-ar.exe cr C:\Users\Osman\AppData\Local\Temp\emscripten_temp\libgl-webgl2.a @C:\Users\Osman\AppData\Local\Temp\emscripten_temp\emscripten_wxir3mee.rsp
shared:DEBUG: successfully executed C:\Users\Osman\AppData\Local\Programs\Python\Python38\python.exe C:\emsdk\upstream\emscripten\emar.py cr C:\Users\Osman\AppData\Local\Temp\emscripten_temp\libgl-webgl2.a @C:\Users\Osman\AppData\Local\Temp\emscripten_8ti7o_as.rsp
cache:INFO:  - ok
system_libs:DEBUG: including libmalloc (libdlmalloc.a)
system_libs:DEBUG: including libpthread (libpthread_stub.a)
system_libs:DEBUG: including libc_rt_wasm (libc_rt_wasm.a)
emcc:DEBUG: emcc step "calculate system libraries" took 14.06 seconds
emcc:DEBUG: linking: ['main.obj', 'notepad.obj', '-LC:\\emsdk\\upstream\\emscripten\\system\\local\\lib', 'notepad.js_plugin_import.obj', '-LC:\\emsdk\\upstream\\emscripten\\system\\lib', 'moc_notepad.obj', '-LC:\\Users\\Osman\\.emscripten_cache\\wasm-obj', 'C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a', 'C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a', 'C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a', 'C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a', 'C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a', 'C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a', 'C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libcompiler_rt.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc-wasm.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc++-noexcept.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc++abi-noexcept.a', '--whole-archive', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libembind-rtti.a', '--no-whole-archive', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libgl-webgl2.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libdlmalloc.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libpthread_stub.a', 'C:\\Users\\Osman\\.emscripten_cache\\wasm-obj\\libc_rt_wasm.a']
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: moc_main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: main.obj: machine type must be wasm32
wasm-ld: error: qprinter.obj: machine type must be wasm32
wasm-ld: error: qprintdialog_unix.obj: machine type must be wasm32
wasm-ld: error: qaction.obj: machine type must be wasm32
wasm-ld: error: qapplication.obj: machine type must be wasm32
wasm-ld: error: qboxlayout.obj: machine type must be wasm32
wasm-ld: error: qwidget.obj: machine type must be wasm32
wasm-ld: error: qmainwindow.obj: machine type must be wasm32
wasm-ld: error: qmenu.obj: machine type must be wasm32
wasm-ld: error: qmenubar.obj: machine type must be wasm32
wasm-ld: error: qstatusbar.obj: machine type must be wasm32
wasm-ld: error: qtextedit.obj: machine type must be wasm32
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
shared:ERROR: 'C:/emsdk/upstream/bin\wasm-ld.exe -o C:\Users\Osman\AppData\Local\Temp\emscripten_temp\notepad.wasm --allow-undefined --lto-O0 main.obj notepad.obj -LC:\emsdk\upstream\emscripten\system\local\lib notepad.js_plugin_import.obj -LC:\emsdk\upstream\emscripten\system\lib moc_notepad.obj -LC:\Users\Osman\.emscripten_cache\wasm-obj C:/Qt/5.13.1/wasm_32/plugins/platforms/libqwasm.a C:/Qt/5.13.1/wasm_32/lib/libQt5EventDispatcherSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5FontDatabaseSupport.a C:/Qt/5.13.1/wasm_32/lib/libqtfreetype.a C:/Qt/5.13.1/wasm_32/lib/libQt5EglSupport.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqgif.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqicns.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqico.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqjpeg.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtga.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqtiff.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwbmp.a C:/Qt/5.13.1/wasm_32/plugins/imageformats/libqwebp.a C:/Qt/5.13.1/wasm_32/lib/libQt5PrintSupport.a C:/Qt/5.13.1/wasm_32/lib/libQt5Widgets.a C:/Qt/5.13.1/wasm_32/lib/libQt5Gui.a C:/Qt/5.13.1/wasm_32/lib/libqtlibpng.a C:/Qt/5.13.1/wasm_32/lib/libqtharfbuzz.a C:/Qt/5.13.1/wasm_32/lib/libQt5Core.a C:/Qt/5.13.1/wasm_32/lib/libqtpcre2.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc.a C:\Users\Osman\.emscripten_cache\wasm-obj\libcompiler_rt.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc-wasm.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc++-noexcept.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc++abi-noexcept.a --whole-archive C:\Users\Osman\.emscripten_cache\wasm-obj\libembind-rtti.a --no-whole-archive C:\Users\Osman\.emscripten_cache\wasm-obj\libgl-webgl2.a C:\Users\Osman\.emscripten_cache\wasm-obj\libdlmalloc.a C:\Users\Osman\.emscripten_cache\wasm-obj\libpthread_stub.a C:\Users\Osman\.emscripten_cache\wasm-obj\libc_rt_wasm.a --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location --export fflush --export emscripten_GetProcAddress --export strstr --export emscripten_webgl_make_context_current --export emscripten_webgl_get_current_context --export emscripten_builtin_free --export _get_environ --export emscripten_builtin_memalign --export memalign --export realloc --export _ZSt18uncaught_exceptionv --export __cxa_find_matching_catch --export __cxa_is_pointer_type --export __cxa_can_catch --export strlen --export _get_tzname --export _get_daylight --export _get_timezone -z stack-size=5242880 --initial-memory=16777216 --no-entry --global-base=1024' failed (1)
cache:DEBUG: PID 16392 released multiprocess file lock to Emscripten cache at C:\Users\Osman\.emscripten_cache\wasm-obj
NMAKE : fatal error U1077: 'C:\emsdk\upstream\emscripten\em++.BAT' : return code '0x1'
Stop.

I switched into the C:/emsdk/upstream/bin directory and ran wasm-dis there, but got this:

Failed opening ''

DragonOsman avatar Oct 19 '19 20:10 DragonOsman

Can you attach main.obj. i have not idea why its bitcode, and even if it was bitcode it should have machine type wasm32. Very strange.

sbc100 avatar Oct 19 '19 20:10 sbc100