linuxdeepin / unilang Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
使用clang++编译时出现如下编译错误
: "${CXX:=clang++}"
: "${CXXFLAGS=-std=c++11 -Wall -Wextra -g}"
./build.sh
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.
正常编译生成可执行文件
Distribution: Ubuntu22.04
Version: V0.12
llvm-config version 7.0.0
运行 ./demo/qt.txt
样例出现 segmentation fault
错误
./unilang ./demo/qt.txt
DEBUG:
Loading script ...
QSocketNotifier: Can only be used with threads started with QThread
DEBUG:
[ctor] MyWidget
DEBUG: Created slot: slot().
Segmentation fault (core dumped)
应该得到和python3 demo/qt.py
一样的效果
Ubuntu22.04
V0.12
No response
编译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
以下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
编译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
能正常编译
docker images: docker pull debian:buster
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.