Skip to content

Commit ed4ffd8

Browse files
fix compilarion error in debug build.
1 parent def5dc7 commit ed4ffd8

File tree

5 files changed

+61
-12
lines changed

5 files changed

+61
-12
lines changed

.github/workflows/actions.yml

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,18 @@ jobs:
2020
sudo rm -f /usr/bin/qmake
2121
sudo ln -sf /usr/bin/qmake6 /usr/bin/qmake
2222
qmake -v
23+
- name: configure for debug
24+
run: |
25+
./configure --prefix=/usr/local --spec=linux-g++ --enable-debug
26+
- name: make for debug
27+
run: |
28+
make -j4 -C src
29+
sudo make -C src install
30+
make -j4 -C tools
31+
sudo make -C tools install
2332
- name: configure
24-
run: ./configure --prefix=/usr/local --spec=linux-g++
33+
run: |
34+
./configure --prefix=/usr/local --spec=linux-g++
2535
- name: make
2636
run: |
2737
make -j4 -C src
@@ -63,8 +73,18 @@ jobs:
6373
sudo rm -f /usr/bin/qmake
6474
sudo ln -sf /usr/bin/qmake6 /usr/bin/qmake
6575
qmake -v
76+
- name: configure for debug
77+
run: |
78+
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-lz4 --spec=linux-clang --enable-debug
79+
- name: make for debug
80+
run: |
81+
make -j4 -C src
82+
sudo make -C src install
83+
make -j4 -C tools
84+
sudo make -C tools install
6685
- name: configure
67-
run: ./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-lz4 --spec=linux-clang
86+
run: |
87+
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-lz4 --spec=linux-clang
6888
- name: make
6989
run: |
7090
make -j4 -C src
@@ -106,6 +126,15 @@ jobs:
106126
sudo rm -f /usr/bin/qmake
107127
sudo ln -sf /usr/bin/qmake6 /usr/bin/qmake
108128
qmake -v
129+
- name: configure for debug
130+
run: |
131+
./configure --prefix=/usr/local --spec=linux-g++ --enable-debug
132+
- name: make for debug
133+
run: |
134+
make -j4 -C src
135+
sudo make -C src install
136+
make -j4 -C tools
137+
sudo make -C tools install
109138
- name: configure
110139
run: |
111140
./configure --prefix=/usr/local --spec=linux-g++
@@ -145,8 +174,18 @@ jobs:
145174
run: |
146175
which pkg-config || brew install pkg-config
147176
brew install qt6 jq
177+
- name: configure for debug
178+
run: |
179+
./configure --prefix=/usr/local --enable-debug
180+
- name: build for debug
181+
run: |
182+
make -j4 -C src
183+
sudo make -C src install
184+
make -j4 -C tools
185+
sudo make -C tools install
148186
- name: configure
149-
run: ./configure --prefix=/usr/local
187+
run: |
188+
./configure --prefix=/usr/local
150189
- name: build
151190
run: |
152191
make -j4 -C src
@@ -166,8 +205,18 @@ jobs:
166205
run: |
167206
which pkg-config || brew install pkg-config
168207
brew install qt6 jq mongo-c-driver gflags glog lz4
208+
- name: configure for debug
209+
run: |
210+
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4 --enable-debug
211+
- name: build for debug
212+
run: |
213+
make -j4 -C src
214+
sudo make -C src install
215+
make -j4 -C tools
216+
sudo make -C tools install
169217
- name: configure
170-
run: ./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4
218+
run: |
219+
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4
171220
- name: build
172221
run: |
173222
make -j4 -C src

src/tsharedmemory_unix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ bool TSharedMemory::attach()
144144
}
145145

146146
_size = st.st_size;
147-
tSystemDebug("SharedMemory attached. name:{} size:{}", qUtf8Printable(_name), _size);
147+
tSystemDebug("SharedMemory attached. name:{} size:{}", qUtf8Printable(_name), (quint64)_size);
148148
return true;
149149

150150
error:

src/tsharedmemoryallocator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void TSharedMemoryAllocator::setbrk(bool initial)
139139
}
140140

141141
pb_header = (Tf::program_break_header_t *)_sharedMemory->data();
142-
tSystemDebug("addr = {:#x}", (uintptr_t)_sharedMemory->data());
142+
tSystemDebug("addr = {:#x}", (quint64)_sharedMemory->data());
143143

144144
// Checks checksum
145145
uint64_t ck = (uint64_t)_sharedMemory->size() * (uint64_t)_sharedMemory->size();
@@ -441,11 +441,11 @@ void TSharedMemoryAllocator::dump() const
441441
Tf::alloc_header_t *cur = pb_header->alloc_head();
442442

443443
tSystemDebug("-- memory block information --");
444-
tSystemDebug("table info: blocks = {}, free = {}, used = {}, free-size = {}, segment-size = {}", countBlocks(), countFreeBlocks(), pb_header->at.used, sizeOfFreeBlocks(), dataSegmentSize());
445-
tSystemDebug("block info: head = {:#x}, tail = {:#x}", (uintptr_t)pb_header->alloc_head(), (uintptr_t)pb_header->alloc_tail());
444+
tSystemDebug("table info: blocks = {}, free = {}, used = {}, free-size = {}, segment-size = {}", countBlocks(), countFreeBlocks(), (quint64)pb_header->at.used, (quint64)sizeOfFreeBlocks(), (quint64)dataSegmentSize());
445+
tSystemDebug("block info: head = {:#x}, tail = {:#x}", (quint64)pb_header->alloc_head(), (quint64)pb_header->alloc_tail());
446446
while (cur) {
447447
tSystemDebug("addr = {:#x}, size = {}, freed = {}, next = {:#x}, prev = {:#x}",
448-
(uintptr_t)cur, cur->size, cur->freed, (uintptr_t)cur->next(), (uintptr_t)cur->prev());
448+
(quint64)cur, cur->size, cur->freed, (quint64)cur->next(), (quint64)cur->prev());
449449
cur = cur->next();
450450
}
451451
}

src/tsharedmemorykvsdriver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ bool TSharedMemoryKvsDriver::open(const QString &db, const QString &, const QStr
7575

7676
_allocator = TSharedMemoryAllocator::attach(_name);
7777
if (_allocator) {
78-
tSystemDebug("SharedMemory attach. name:{} size:{}", qUtf8Printable(_name), _allocator->mapSize());
78+
tSystemDebug("SharedMemory attach. name:{} size:{}", qUtf8Printable(_name), (quint64)_allocator->mapSize());
7979
_size = _allocator->mapSize();
8080
} else {
81-
tSystemError("SharedMemory attach error. name:{}", qUtf8Printable(_name));
81+
tSystemError("SharedMemory attach error. name:{}", qUtf8Printable(_name));
8282
}
8383
return true;
8484
}

tools/tfmanager/systembusdaemon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void SystemBusDaemon::handleDisconnect()
161161
socketSet.remove(socket);
162162
disconnect(socket, nullptr, nullptr, nullptr);
163163
socket->deleteLater();
164-
tSystemDebug("disconnected local socket : {:#x}", (uintptr_t)socket);
164+
tSystemDebug("disconnected local socket : {:#x}", (quint64)socket);
165165
}
166166
}
167167

0 commit comments

Comments
 (0)