Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find -lbracketPairing #8

Open
yurivict opened this issue May 19, 2022 · 12 comments
Open

cannot find -lbracketPairing #8

yurivict opened this issue May 19, 2022 · 12 comments

Comments

@yurivict
Copy link

[ 42% 21/38] : && /usr/local/bin/g++10 -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer  -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -Wall -Wextra -Wshadow -Wconversion -Ofast -std=c++20 -Wno-shadow -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer  -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -L/usr/local/lib/gcc10 ParserGen/CMakeFiles/grammarstrip.dir/GrammarStrip.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/BNFContext.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/Parser.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/ParseFile.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/ParserGenBase.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/Scanner.cpp.o -o ParserGen/grammarstrip -L/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/src   -L/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../CBrackets -Wl,-rpath,/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/src:/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../CBrackets  -lbracketPairing  -lbux  -lfmt  -lstdc++ && :
FAILED: ParserGen/grammarstrip 
: && /usr/local/bin/g++10 -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer  -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -Wall -Wextra -Wshadow -Wconversion -Ofast -std=c++20 -Wno-shadow -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer  -Wl,-rpath=/usr/local/lib/gcc10 -isystem /usr/local/include -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -L/usr/local/lib/gcc10 ParserGen/CMakeFiles/grammarstrip.dir/GrammarStrip.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/BNFContext.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/Parser.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/ParseFile.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/ParserGenBase.cpp.o ParserGen/CMakeFiles/grammarstrip.dir/Scanner.cpp.o -o ParserGen/grammarstrip -L/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/src   -L/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../CBrackets -Wl,-rpath,/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../bux/src:/disk-samsung/freebsd-ports/devel/parsergen/work/parsergen-1.7.0-9-gbda59af/ParserGen/../../CBrackets  -lbracketPairing  -lbux  -lfmt  -lstdc++ && :
/usr/local/bin/ld: cannot find -lbracketPairing
/usr/local/bin/ld: cannot find -lbux
collect2: error: ld returned 1 exit status
@yurivict
Copy link
Author

CBrackets and bux projects are checked out but libraries there aren't built by cmake.

@buck-yeh
Copy link
Owner

Sorry to keep you waiting, 1.7.1 is out. The shell commands for from github in any of Linux distros are also changed:

   git clone https://github.com/buck-yeh/parsergen.git
   cd parsergen
   cmake -D FETCH_DEPENDEES=1 -D DEPENDEE_ROOT=_deps .
   make -j
   PSGEN_DIR="/full/path/to/current/dir"

Please let me know if the change works for you.

@yurivict
Copy link
Author

yurivict commented May 22, 2022

cmake -D FETCH_DEPENDEES=1

For the purpose of package builder fetch during configure doesn't work, because configure and build aren't allowed to fetch anything for security reasons.

This is why there are git modules, that can be pre-fetched in a uniform way.

Custom fetch during configure just can't add any value that git modules don't have.

@yurivict
Copy link
Author

Also local headers should be included with quotes, not angle brackets.

@buck-yeh
Copy link
Owner

Which #include <...> do you refer to? I don't quite follow.

@yurivict
Copy link
Author

#include <bux/...>

@buck-yeh
Copy link
Owner

I use FetchContent for my own purposes.
As author of all related projects, I put all cloned projects under the same parent folder. This way I can experiment changes between projects without even commit them. The working mode requires no ftech, and submodule too. Submodule forces the dependent repos reside under the root working folder as subfolders (of any depth though). It just dons't apply.

@buck-yeh
Copy link
Owner

#include <bux/...>

To any project other than bux, parsergen or not, bux/*.h isn't local header.

@buck-yeh
Copy link
Owner

For the purpose of package builder fetch during configure doesn't work, ...

That is not true, I do use FetchContent to pack ArchLinux AUR package

@yurivict
Copy link
Author

That is not true, I do use FetchContent to pack ArchLinux AUR package

Arch allows fetch, this is why it isn't a safe distro.
Virtually all major port systems don't allow fetch for security reasons: fetch doesn't guarantee that downloaded files will be exactly same every time.

@buck-yeh
Copy link
Owner

Virtually all major port systems don't allow fetch for security reasons: fetch doesn't guarantee that downloaded files will be exactly same every time.

That is new to me! So even if I restrict myself to only fetch from github with specific tag, is it still not guaranteed to have the same code ?

@yurivict
Copy link
Author

yurivict commented May 23, 2022

That is new to me! So even if I restrict myself to only fetch from github with specific tag, is it still not guaranteed to have the same code ?

The Git protocol itself doesn't guarantee that it would always return the same code even if the same tag is requested. If Git server is compromised hackers can return different code.

For this reason all required files are downloaded by the package builder before the build. Their cryptographic fingerprints are compared against the stored fingerprints, and then build runs without network access.

It works this way for RPMs (like in Redhat/Fedora), in Ubuntu, in FreeBSD, in OpenBSD, etc. Arch Linux is an exception, this is why it isn't a secure packaging system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants