GithubHelp home page GithubHelp logo

unilang's Issues

使用clang++编译时出现如下编译错误

SUMMARY | 概要

使用clang++编译时出现如下编译错误

STEPS TO REPRODUCE | 重现步骤

  1. 使用如下编译选项
: "${CXX:=clang++}"
: "${CXXFLAGS=-std=c++11 -Wall -Wextra -g}"
  1. 开始编译
./build.sh

OBSERVED BEHAVIORS | 观察到的行为

In file included from /home/eqqie/work/unilang/src/TCO.cpp:3:
In file included from include/TCO.h:6:
In file included from include/Lexical.h:6:
In file included from include/Unilang.h:7:
In file included from /home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YSLib/Adaptor/YAdaptor.h:37:
In file included from /home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YCLib/FileIO.h:32:
In file included from /home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YCLib/Debug.h:32:
In file included from /home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YCLib/YCommon.h:44:
In file included from /home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YCLib/Container.h:53:
/usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/debug/forward_list:729:21: error: use of overloaded operator '==' is ambiguous (with operand types
      'std::__debug::forward_list<std::pair<YSLib::ValueObject, std::shared_ptr<Unilang::Environment> >, ystdex::pmr::polymorphic_allocator<std::pair<YSLib::ValueObject,
      std::shared_ptr<Unilang::Environment> > > >::_Base_const_iterator' (aka '_Fwd_list_const_iterator<std::pair<YSLib::ValueObject, std::shared_ptr<Unilang::Environment>
      > >') and 'const std::__debug::forward_list<std::pair<YSLib::ValueObject, std::shared_ptr<Unilang::Environment> >,
      ystdex::pmr::polymorphic_allocator<std::pair<YSLib::ValueObject, std::shared_ptr<Unilang::Environment> > > >::_Base_iterator' (aka 'const
      _Fwd_list_iterator<std::pair<YSLib::ValueObject, std::shared_ptr<Unilang::Environment> > >'))
                                         { return __it == __x; });
                                                  ~~~~ ^  ~~~
/home/eqqie/work/unilang/src/TCO.cpp:156:15: note: in instantiation of function template specialization 'std::__debug::forward_list<std::pair<YSLib::ValueObject,
      std::shared_ptr<Unilang::Environment> >, ystdex::pmr::polymorphic_allocator<std::pair<YSLib::ValueObject, std::shared_ptr<Unilang::Environment> > >
      >::remove_if<(lambda at /home/eqqie/work/unilang/src/TCO.cpp:156:25)>' requested here
                record_list.remove_if([&](const FrameRecord& r) noexcept -> bool{
                            ^
/usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/forward_list.h:259:7: note: candidate function
      operator==(const _Self& __x, const _Self& __y) noexcept
      ^
/home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YSLib/Core/YObject.h:1376:2: note: candidate function [with _type =
      std::_Fwd_list_iterator<std::pair<YSLib::ValueObject, std::shared_ptr<Unilang::Environment> > >]
        operator==(const ValueObject& x, const _type& y)
        ^
/home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YSLib/Core/YObject.h:1382:2: note: candidate function [with _type =
      std::_Fwd_list_const_iterator<std::pair<YSLib::ValueObject, std::shared_ptr<Unilang::Environment> > >]
        operator==(const _type& x, const ValueObject& y)
        ^
/home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YSLib/Core/YObject.h:1368:3: note: candidate function
                PDefHOp(bool, ==, const ValueObject& x, const ValueObject& y)
                ^
/home/eqqie/work/unilang/3rdparty/YSLib/YFramework/include/YBaseMacro.h:87:12: note: expanded from macro 'PDefHOp'
        PDefH(_t, operator _op, __VA_ARGS__)
                  ^
1 error generated.

EXPECTED BEHAVIORS | 预期行为

正常编译生成可执行文件

ENVIRONMENT INFORMATION | 环境信息

Distribution: Ubuntu22.04
Version: V0.12

ADDITIONAL INFORMATION | 附加信息

llvm-config version 7.0.0

运行qt应用demo时提示如下错误

SUMMARY | 概要

运行 ./demo/qt.txt 样例出现 segmentation fault 错误

STEPS TO REPRODUCE | 重现步骤

./unilang ./demo/qt.txt

OBSERVED BEHAVIORS | 观察到的行为

DEBUG:
Loading script ...
QSocketNotifier: Can only be used with threads started with QThread
DEBUG:
[ctor] MyWidget
DEBUG: Created slot: slot().
Segmentation fault (core dumped)

EXPECTED BEHAVIORS | 预期行为

应该得到和python3 demo/qt.py一样的效果

image

ENVIRONMENT INFORMATION | 环境信息

Ubuntu22.04

V0.12

ADDITIONAL INFORMATION | 附加信息

No response

v0.13 error adding symbols: DSO missing from command line

SUMMARY | 概要

编译v0.13分支时,报以下错

#0 0.314 Configuring ...
#0 0.314 Output path is "unilang".
#0 0.314 Build directory is ".".
#0 0.374 Found LLVM 7 prefix: /usr/lib/llvm-7
#0 0.383 LLVM version: 7.0.1
#0 0.424 Configuring Done.
#0 0.424 Building ...
#0 0.517 Using parallel.
#0 30.80 /usr/bin/ld: ./19.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
#0 30.80 /usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
#0 30.80 collect2: error: ld returned 1 exit status

STEPS TO REPRODUCE | 重现步骤

以下dockerfile放项目根目录, 执行docker build -t deepin/unilang:v0.13 .构建

FROM debian:buster

RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list \
    && sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list \
    && apt update \
    && apt install -y bash coreutils git g++ libffi-dev llvm-7-dev pkg-config qtbase5-dev qtdeclarative5-dev parallel

ADD . /unilang
WORKDIR /unilang

RUN git submodule update --init \
    && ./build.sh

OBSERVED BEHAVIORS | 观察到的行为

编译v0.13分支时,报以下错

#0 0.314 Configuring ...
#0 0.314 Output path is "unilang".
#0 0.314 Build directory is ".".
#0 0.374 Found LLVM 7 prefix: /usr/lib/llvm-7
#0 0.383 LLVM version: 7.0.1
#0 0.424 Configuring Done.
#0 0.424 Building ...
#0 0.517 Using parallel.
#0 30.80 /usr/bin/ld: ./19.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
#0 30.80 /usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
#0 30.80 collect2: error: ld returned 1 exit status

EXPECTED BEHAVIORS | 预期行为

能正常编译

ENVIRONMENT INFORMATION | 环境信息

docker images: docker pull debian:buster

ADDITIONAL INFORMATION | 附加信息

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.